From 664674752896cc413aeaea83526aa4fb2634e3d3 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 13 Aug 2025 14:57:30 +0200 Subject: [PATCH 1/3] Ports Settings: Reset c to 0 before adding LPT devices. --- src/qt/qt_settingsports.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qt/qt_settingsports.cpp b/src/qt/qt_settingsports.cpp index 6b260e4fb..d072a4642 100644 --- a/src/qt/qt_settingsports.cpp +++ b/src/qt/qt_settingsports.cpp @@ -122,6 +122,8 @@ SettingsPorts::onCurrentMachineChanged(int machineId) else ui->comboBoxLptECPDMA->setEnabled(true); + c = 0; + // LPT Device QComboBox * cbox[PARALLEL_MAX] = { 0 }; QAbstractItemModel *models[PARALLEL_MAX] = { 0 }; From 07a3b9991588caba68c1a0f5ea07e3b6d4058a66 Mon Sep 17 00:00:00 2001 From: nelsonhef Date: Wed, 13 Aug 2025 18:12:34 -0300 Subject: [PATCH 2/3] Added "Internal LPT ECP DMA" msgid string --- src/qt/languages/86box.pot | 3 +++ src/qt/languages/ca-ES.po | 3 +++ src/qt/languages/cs-CZ.po | 3 +++ src/qt/languages/de-DE.po | 3 +++ src/qt/languages/es-ES.po | 3 +++ src/qt/languages/fi-FI.po | 3 +++ src/qt/languages/fr-FR.po | 3 +++ src/qt/languages/hr-HR.po | 3 +++ src/qt/languages/hu-HU.po | 3 +++ src/qt/languages/it-IT.po | 3 +++ src/qt/languages/ja-JP.po | 3 +++ src/qt/languages/ko-KR.po | 3 +++ src/qt/languages/nl-NL.po | 3 +++ src/qt/languages/pl-PL.po | 3 +++ src/qt/languages/pt-BR.po | 3 +++ src/qt/languages/pt-PT.po | 3 +++ src/qt/languages/ru-RU.po | 39 +++++++++++++++++++++++--------------- src/qt/languages/sk-SK.po | 3 +++ src/qt/languages/sl-SI.po | 3 +++ src/qt/languages/sv-SE.po | 3 +++ src/qt/languages/tr-TR.po | 3 +++ src/qt/languages/uk-UA.po | 3 +++ src/qt/languages/vi-VN.po | 3 +++ src/qt/languages/zh-CN.po | 3 +++ src/qt/languages/zh-TW.po | 3 +++ 25 files changed, 96 insertions(+), 15 deletions(-) diff --git a/src/qt/languages/86box.pot b/src/qt/languages/86box.pot index 54a6bb204..96bbf479c 100644 --- a/src/qt/languages/86box.pot +++ b/src/qt/languages/86box.pot @@ -519,6 +519,9 @@ msgstr "" msgid "LPT4 Device:" msgstr "" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "" diff --git a/src/qt/languages/ca-ES.po b/src/qt/languages/ca-ES.po index 08f17e20b..566746d31 100644 --- a/src/qt/languages/ca-ES.po +++ b/src/qt/languages/ca-ES.po @@ -519,6 +519,9 @@ msgstr "Dispositiu LPT3:" msgid "LPT4 Device:" msgstr "Dispositiu LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Port sèrie 1" diff --git a/src/qt/languages/cs-CZ.po b/src/qt/languages/cs-CZ.po index b8184562f..fe2eb0ea3 100644 --- a/src/qt/languages/cs-CZ.po +++ b/src/qt/languages/cs-CZ.po @@ -519,6 +519,9 @@ msgstr "Zařízení na LPT3:" msgid "LPT4 Device:" msgstr "Zařízení na LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Povolit port COM1" diff --git a/src/qt/languages/de-DE.po b/src/qt/languages/de-DE.po index e88d5c8af..09d4ad391 100644 --- a/src/qt/languages/de-DE.po +++ b/src/qt/languages/de-DE.po @@ -519,6 +519,9 @@ msgstr "LPT3-Gerät:" msgid "LPT4 Device:" msgstr "LPT4-Gerät:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Serielle Schnittstelle 1" diff --git a/src/qt/languages/es-ES.po b/src/qt/languages/es-ES.po index b99d96819..c39070a9e 100644 --- a/src/qt/languages/es-ES.po +++ b/src/qt/languages/es-ES.po @@ -519,6 +519,9 @@ msgstr "Dispositivo LPT3:" msgid "LPT4 Device:" msgstr "Dispositivo LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Puerto serie 1" diff --git a/src/qt/languages/fi-FI.po b/src/qt/languages/fi-FI.po index ab630dcc0..fddd60ef1 100644 --- a/src/qt/languages/fi-FI.po +++ b/src/qt/languages/fi-FI.po @@ -519,6 +519,9 @@ msgstr "LPT3-laite:" msgid "LPT4 Device:" msgstr "LPT4-laite:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Sarjaportti 1" diff --git a/src/qt/languages/fr-FR.po b/src/qt/languages/fr-FR.po index bf8f59237..9cdb6fbc9 100644 --- a/src/qt/languages/fr-FR.po +++ b/src/qt/languages/fr-FR.po @@ -519,6 +519,9 @@ msgstr "Dispositif LPT3:" msgid "LPT4 Device:" msgstr "Dispositif LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Port série 1" diff --git a/src/qt/languages/hr-HR.po b/src/qt/languages/hr-HR.po index 694c61ad2..72572bf64 100644 --- a/src/qt/languages/hr-HR.po +++ b/src/qt/languages/hr-HR.po @@ -519,6 +519,9 @@ msgstr "Uređaj LPT3:" msgid "LPT4 Device:" msgstr "Uređaj LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Serijska vrata 1" diff --git a/src/qt/languages/hu-HU.po b/src/qt/languages/hu-HU.po index 84889a336..04f3d0087 100644 --- a/src/qt/languages/hu-HU.po +++ b/src/qt/languages/hu-HU.po @@ -519,6 +519,9 @@ msgstr "LPT3 eszköz:" msgid "LPT4 Device:" msgstr "LPT4 eszköz:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Soros port 1" diff --git a/src/qt/languages/it-IT.po b/src/qt/languages/it-IT.po index 873f80b3d..a2bef4558 100644 --- a/src/qt/languages/it-IT.po +++ b/src/qt/languages/it-IT.po @@ -519,6 +519,9 @@ msgstr "Dispositivo LPT3:" msgid "LPT4 Device:" msgstr "Dispositivo LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Porta seriale 1" diff --git a/src/qt/languages/ja-JP.po b/src/qt/languages/ja-JP.po index 47731d6c9..cf94fc8ef 100644 --- a/src/qt/languages/ja-JP.po +++ b/src/qt/languages/ja-JP.po @@ -519,6 +519,9 @@ msgstr "LPT3デバイス:" msgid "LPT4 Device:" msgstr "LPT4デバイス:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "シリアルポート1" diff --git a/src/qt/languages/ko-KR.po b/src/qt/languages/ko-KR.po index 29b19f683..8839f6172 100644 --- a/src/qt/languages/ko-KR.po +++ b/src/qt/languages/ko-KR.po @@ -519,6 +519,9 @@ msgstr "LPT3 장치:" msgid "LPT4 Device:" msgstr "LPT4 장치:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "직렬 포트 1" diff --git a/src/qt/languages/nl-NL.po b/src/qt/languages/nl-NL.po index b24895bf2..78556a547 100644 --- a/src/qt/languages/nl-NL.po +++ b/src/qt/languages/nl-NL.po @@ -519,6 +519,9 @@ msgstr "LPT3-apparaat:" msgid "LPT4 Device:" msgstr "LPT4-apparaat:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Seriële poort 1" diff --git a/src/qt/languages/pl-PL.po b/src/qt/languages/pl-PL.po index 9e6cac667..8e0381be3 100644 --- a/src/qt/languages/pl-PL.po +++ b/src/qt/languages/pl-PL.po @@ -519,6 +519,9 @@ msgstr "Urządzenie LPT3:" msgid "LPT4 Device:" msgstr "Urządzenie LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Port szeregowy 1" diff --git a/src/qt/languages/pt-BR.po b/src/qt/languages/pt-BR.po index 94fde8f9e..83ef0a52e 100644 --- a/src/qt/languages/pt-BR.po +++ b/src/qt/languages/pt-BR.po @@ -519,6 +519,9 @@ msgstr "Dispositivo LPT3:" msgid "LPT4 Device:" msgstr "Dispositivo LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Porta serial 1" diff --git a/src/qt/languages/pt-PT.po b/src/qt/languages/pt-PT.po index df927a72e..416136a5b 100644 --- a/src/qt/languages/pt-PT.po +++ b/src/qt/languages/pt-PT.po @@ -519,6 +519,9 @@ msgstr "Dispositivo LPT3:" msgid "LPT4 Device:" msgstr "Dispositivo LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Porta de série 1" diff --git a/src/qt/languages/ru-RU.po b/src/qt/languages/ru-RU.po index ec60c751f..a2e3b1fbc 100644 --- a/src/qt/languages/ru-RU.po +++ b/src/qt/languages/ru-RU.po @@ -519,6 +519,9 @@ msgstr "Устройство LPT3:" msgid "LPT4 Device:" msgstr "Устройство LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Последовательный порт COM1" @@ -1290,21 +1293,6 @@ msgstr "&Завершить процесс" msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" msgstr "Принудительное завершение процесса виртуальной машины может привести к потере данных. Делайте это только в том случае, если процесс 86Box завис.\n\nВы действительно хотите принудительно завершить процесс виртуальной машины \"%1\"?" -msgid "&Wipe NVRAM" -msgstr "&Стереть NVRAM" - -msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" -msgstr "Это удалит все файлы NVRAM (и связанные) виртуальной машины, расположенной в подпапке \"nvr\". Вам придётся снова реконфигурировать настройки BIOS (и, возможно, другие устройства внутри виртуальной машины), если применимо.\n\nВы уверены, что хотите стереть всё содержимое NVRAM виртуальной машины \"%1\"?" - -msgid "Success" -msgstr "Успешно" - -msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" -msgstr "Успешно стёрто содержимое NVRAM виртуальной машины \"%1\"" - -msgid "An error occured trying to wipe the NVRAM contents of the virtual machine \"%1\"" -msgstr "Произошла ошибка, пытаясь стереть содержимое NVRAM виртуальной машины \"%1\"" - msgid "&Delete" msgstr "&Удалить" @@ -2847,6 +2835,21 @@ msgstr "" msgid "ISA ROM" msgstr "" +msgid "&Wipe NVRAM" +msgstr "&Стереть NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Это удалит все файлы NVRAM (и связанные) виртуальной машины, расположенной в подпапке \"nvr\". Вам придётся снова реконфигурировать настройки BIOS (и, возможно, другие устройства внутри виртуальной машины), если применимо.\n\nВы уверены, что хотите стереть всё содержимое NVRAM виртуальной машины \"%1\"?" + +msgid "Success" +msgstr "Успешно" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Успешно стёрто содержимое NVRAM виртуальной машины \"%1\"" + +msgid "An error occured trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Произошла ошибка, пытаясь стереть содержимое NVRAM виртуальной машины \"%1\"" + msgid "%1 VM Manager" msgstr "" @@ -2874,6 +2877,12 @@ msgstr "Проверка обновлений завершена" msgid "You are running the latest %1 version of 86Box: %2" msgstr "Вы используете последнюю %1 версию 86Box: %2" +msgid "version" +msgstr "" + +msgid "build" +msgstr "" + msgid "You are currently running %1 %2. " msgstr "Вы сейчас используете %1 %2. " diff --git a/src/qt/languages/sk-SK.po b/src/qt/languages/sk-SK.po index 5aa01a455..7649fa860 100644 --- a/src/qt/languages/sk-SK.po +++ b/src/qt/languages/sk-SK.po @@ -519,6 +519,9 @@ msgstr "Zariadenie na LPT3:" msgid "LPT4 Device:" msgstr "Zariadenie na LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Povoliť port COM1" diff --git a/src/qt/languages/sl-SI.po b/src/qt/languages/sl-SI.po index 593198ae8..ebd5bb353 100644 --- a/src/qt/languages/sl-SI.po +++ b/src/qt/languages/sl-SI.po @@ -519,6 +519,9 @@ msgstr "Naprava LPT3:" msgid "LPT4 Device:" msgstr "Naprava LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Serijska vrata 1" diff --git a/src/qt/languages/sv-SE.po b/src/qt/languages/sv-SE.po index c423558d6..e5355e87b 100644 --- a/src/qt/languages/sv-SE.po +++ b/src/qt/languages/sv-SE.po @@ -519,6 +519,9 @@ msgstr "LPT3-enhet:" msgid "LPT4 Device:" msgstr "LPT4-enhet:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Serieport 1" diff --git a/src/qt/languages/tr-TR.po b/src/qt/languages/tr-TR.po index 986689463..7029efbc8 100644 --- a/src/qt/languages/tr-TR.po +++ b/src/qt/languages/tr-TR.po @@ -519,6 +519,9 @@ msgstr "LPT3 Cihazı:" msgid "LPT4 Device:" msgstr "LPT4 Cihazı:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "1. Seri Port" diff --git a/src/qt/languages/uk-UA.po b/src/qt/languages/uk-UA.po index 799fa07b7..d0cd13f0e 100644 --- a/src/qt/languages/uk-UA.po +++ b/src/qt/languages/uk-UA.po @@ -519,6 +519,9 @@ msgstr "Пристрій LPT3:" msgid "LPT4 Device:" msgstr "Пристрій LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Послідов. порт COM1" diff --git a/src/qt/languages/vi-VN.po b/src/qt/languages/vi-VN.po index c603fa8fe..834a44c97 100644 --- a/src/qt/languages/vi-VN.po +++ b/src/qt/languages/vi-VN.po @@ -519,6 +519,9 @@ msgstr "Thiết bị LPT3:" msgid "LPT4 Device:" msgstr "Thiết bị LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Cổng serial 1" diff --git a/src/qt/languages/zh-CN.po b/src/qt/languages/zh-CN.po index fd8871a3a..3b3e01dc1 100644 --- a/src/qt/languages/zh-CN.po +++ b/src/qt/languages/zh-CN.po @@ -519,6 +519,9 @@ msgstr "LPT3 设备:" msgid "LPT4 Device:" msgstr "LPT4 设备:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "串口 1" diff --git a/src/qt/languages/zh-TW.po b/src/qt/languages/zh-TW.po index a57f8f30b..d97358ec5 100644 --- a/src/qt/languages/zh-TW.po +++ b/src/qt/languages/zh-TW.po @@ -519,6 +519,9 @@ msgstr "LPT3 裝置:" msgid "LPT4 Device:" msgstr "LPT4 裝置:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "序列埠 1" From d2c8dab3427730f3e9669c1360378be8c51fcda9 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 13 Aug 2025 23:43:51 +0200 Subject: [PATCH 3/3] Finished the great internal machine reorganization and added the FIC PO-6000. --- src/chipset/CMakeLists.txt | 14 +- src/chipset/compaq.c | 135 + .../m_at_grid.c => chipset/grid1520.c} | 26 +- .../m_xt_laserxt.c => chipset/laserxt.c} | 71 +- .../m_xt_philips.c => chipset/philips.c} | 61 +- src/device/CMakeLists.txt | 1 + src/device/mouse.c | 6 +- .../zenith_scratchpad.c} | 104 +- src/disk/CMakeLists.txt | 1 + .../m_ps1_hdc.c => disk/hdc_xta_ps1.c} | 0 src/include/86box/chipset.h | 14 + src/include/86box/machine.h | 1082 +++--- src/include/86box/sio.h | 3 + src/machine/CMakeLists.txt | 20 +- src/machine/m_amstrad_pc5x86.c | 68 - src/machine/m_at.c | 410 --- src/machine/m_at_286.c | 375 ++ src/machine/m_at_386dx.c | 372 ++ src/machine/m_at_386dx_486.c | 2850 +-------------- src/machine/m_at_486_misc.c | 210 ++ src/machine/m_at_486slc.c | 72 + src/machine/m_at_commodore.c | 127 - src/machine/m_at_common.c | 139 + src/machine/m_at_compaq.c | 251 -- src/machine/m_at_misc.c | 4 +- src/machine/m_at_slot1.c | 527 +-- src/machine/m_at_slot1_2.c | 78 + src/machine/m_at_slot1_socket370.c | 151 + src/machine/m_at_slot2.c | 42 +- src/machine/m_at_socket1.c | 397 +++ src/machine/m_at_socket2.c | 374 ++ src/machine/m_at_socket3.c | 419 +++ src/machine/m_at_socket370.c | 380 +- src/machine/m_at_socket3_pci.c | 1439 ++++++++ src/machine/m_at_socket4.c | 298 +- src/machine/m_at_socket5.c | 344 +- src/machine/m_at_socket7.c | 875 ++--- src/machine/m_at_socket7_3v.c | 491 +-- src/machine/m_at_socket8.c | 306 +- src/machine/m_at_sockets7.c | 71 +- src/machine/m_at_t3100e.c | 12 +- src/machine/m_xt.c | 798 +++-- src/machine/m_xt_compaq.c | 95 - src/machine/machine_table.c | 3070 +++++++++-------- src/sio/CMakeLists.txt | 1 + src/sio/sio_cbm_io.c | 112 + 46 files changed, 8739 insertions(+), 7957 deletions(-) create mode 100644 src/chipset/compaq.c rename src/{machine/m_at_grid.c => chipset/grid1520.c} (94%) rename src/{machine/m_xt_laserxt.c => chipset/laserxt.c} (92%) rename src/{machine/m_xt_philips.c => chipset/philips.c} (74%) rename src/{machine/m_xt_zenith.c => device/zenith_scratchpad.c} (55%) rename src/{machine/m_ps1_hdc.c => disk/hdc_xta_ps1.c} (100%) delete mode 100644 src/machine/m_amstrad_pc5x86.c delete mode 100644 src/machine/m_at.c create mode 100644 src/machine/m_at_386dx.c create mode 100644 src/machine/m_at_486_misc.c create mode 100644 src/machine/m_at_486slc.c delete mode 100644 src/machine/m_at_commodore.c create mode 100644 src/machine/m_at_common.c delete mode 100644 src/machine/m_at_compaq.c create mode 100644 src/machine/m_at_slot1_2.c create mode 100644 src/machine/m_at_slot1_socket370.c create mode 100644 src/machine/m_at_socket1.c create mode 100644 src/machine/m_at_socket2.c create mode 100644 src/machine/m_at_socket3.c create mode 100644 src/machine/m_at_socket3_pci.c delete mode 100644 src/machine/m_xt_compaq.c create mode 100644 src/sio/sio_cbm_io.c diff --git a/src/chipset/CMakeLists.txt b/src/chipset/CMakeLists.txt index d61b5c53d..02a62faca 100644 --- a/src/chipset/CMakeLists.txt +++ b/src/chipset/CMakeLists.txt @@ -30,12 +30,15 @@ add_library(chipset OBJECT ali1621.c ali6117.c ali1409.c - headland.c - ims8848.c - intel_82335.c + compaq.c compaq_386.c contaq_82c59x.c cs4031.c + grid1520.c + gc100.c + headland.c + ims8848.c + intel_82335.c intel_420ex.c intel_4x0.c intel_i450kx.c @@ -43,6 +46,7 @@ add_library(chipset OBJECT intel_piix.c isa486c.c ../ioapic.c + laserxt.c neat.c olivetti_eva.c opti283.c @@ -55,6 +59,7 @@ add_library(chipset OBJECT opti822.c opti895.c opti5x7.c + philips.c scamp.c scat.c sis_85c310.c @@ -77,10 +82,9 @@ add_library(chipset OBJECT sis_5595_pmu.c sis_55xx.c sl82c461.c + stpc.c via_vt82c49x.c via_vt82c505.c - gc100.c - stpc.c umc_8886.c umc_hb4.c umc_8890.c diff --git a/src/chipset/compaq.c b/src/chipset/compaq.c new file mode 100644 index 000000000..7a52c9d36 --- /dev/null +++ b/src/chipset/compaq.c @@ -0,0 +1,135 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Emulation of the Compaq 386 memory controller. + * + * Authors: Miran Grca, + * + * Copyright 2023 Miran Grca. + */ +#include +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include "cpu.h" +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/pit.h> +#include <86box/mem.h> +#include <86box/rom.h> +#include <86box/device.h> +#include <86box/keyboard.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/machine.h> +#include <86box/video.h> +#include <86box/vid_cga.h> +#include <86box/vid_cga_comp.h> +#include <86box/plat_unused.h> +#include <86box/chipset.h> + +/* Compaq Deskpro 386 remaps RAM from 0xA0000-0xFFFFF to 0xFA0000-0xFFFFFF */ +typedef struct cpq_t { + mem_mapping_t ram_mapping; +} cpq_t; + +static uint8_t +read_ram(uint32_t addr, UNUSED(void *priv)) +{ + addr = (addr & 0x7ffff) + 0x80000; + addreadlookup(mem_logical_addr, addr); + + return (ram[addr]); +} + +static uint16_t +read_ramw(uint32_t addr, UNUSED(void *priv)) +{ + addr = (addr & 0x7ffff) + 0x80000; + addreadlookup(mem_logical_addr, addr); + + return (*(uint16_t *) &ram[addr]); +} + +static uint32_t +read_raml(uint32_t addr, UNUSED(void *priv)) +{ + addr = (addr & 0x7ffff) + 0x80000; + addreadlookup(mem_logical_addr, addr); + + return (*(uint32_t *) &ram[addr]); +} + +static void +write_ram(uint32_t addr, uint8_t val, UNUSED(void *priv)) +{ + addr = (addr & 0x7ffff) + 0x80000; + addwritelookup(mem_logical_addr, addr); + + mem_write_ramb_page(addr, val, &pages[addr >> 12]); +} + +static void +write_ramw(uint32_t addr, uint16_t val, UNUSED(void *priv)) +{ + addr = (addr & 0x7ffff) + 0x80000; + addwritelookup(mem_logical_addr, addr); + + mem_write_ramw_page(addr, val, &pages[addr >> 12]); +} + +static void +write_raml(uint32_t addr, uint32_t val, UNUSED(void *priv)) +{ + addr = (addr & 0x7ffff) + 0x80000; + addwritelookup(mem_logical_addr, addr); + + mem_write_raml_page(addr, val, &pages[addr >> 12]); +} + +static void +compaq_close(void *priv) +{ + cpq_t *dev = (cpq_t *) priv; + + free(dev); +} + +static void * +compaq_init(UNUSED(const device_t *info)) +{ + cpq_t *dev = (cpq_t *) calloc(1, sizeof(cpq_t)); + + mem_remap_top(384); + mem_mapping_add(&dev->ram_mapping, 0xfa0000, 0x60000, + read_ram, read_ramw, read_raml, + write_ram, write_ramw, write_raml, + 0xa0000 + ram, MEM_MAPPING_INTERNAL, NULL); + + return dev; +} + +const device_t compaq_device = { + .name = "Compaq Memory Control", + .internal_name = "compaq", + .flags = 0, + .local = 0, + .init = compaq_init, + .close = compaq_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/machine/m_at_grid.c b/src/chipset/grid1520.c similarity index 94% rename from src/machine/m_at_grid.c rename to src/chipset/grid1520.c index 448749589..ce8b1e2a9 100644 --- a/src/machine/m_at_grid.c +++ b/src/chipset/grid1520.c @@ -39,6 +39,7 @@ #include <86box/rom.h> #include <86box/vid_cga.h> #include <86box/plat_unused.h> +#include <86box/chipset.h> #define GRID_APPROM_SELECT 0x440 #define GRID_APPROM_ENABLE 0x405 @@ -317,7 +318,7 @@ static void grid_reset(void *priv) { dev->grid_rom_select = 0; } -const device_t grid_device = { +const device_t grid1520_device = { .name = "GRiDcase 1520 chipset", .internal_name = "grid1520", .flags = 0, @@ -330,26 +331,3 @@ const device_t grid_device = { .force_redraw = NULL, .config = NULL }; - -int machine_at_grid1520_init(const machine_t *model) { - int ret = 0; - - ret = bios_load_linear("roms/machines/grid1520/grid1520_891025.rom", - 0x000f8000, 0x8000, 0); - if (bios_only || !ret) - return ret; - - machine_at_common_ide_init(model); - mem_remap_top(384); - - device_add(&kbc_at_device); - // for now just select CGA with amber monitor - //device_add(&cga_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&grid_device); - - return ret; -} diff --git a/src/machine/m_xt_laserxt.c b/src/chipset/laserxt.c similarity index 92% rename from src/machine/m_xt_laserxt.c rename to src/chipset/laserxt.c index fcfcebaa2..a5308e2f0 100644 --- a/src/machine/m_xt_laserxt.c +++ b/src/chipset/laserxt.c @@ -1,4 +1,23 @@ -/*This is the chipset used in the LaserXT series model*/ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of the VTech LaserXT chipset. + * + * Authors: Sarah Walker, + * Miran Grca, + * Fred N. van Kempen, + * Jasmine Iwanek, + * + * Copyright 2008-2025 Sarah Walker. + * Copyright 2016-2025 Miran Grca. + * Copyright 2017-2025 Fred N. van Kempen. + * Copyright 2025 Jasmine Iwanek. + */ #include #include #include @@ -452,53 +471,3 @@ const device_t lxt3_device = { .force_redraw = NULL, .config = lxt3_config }; - -static void -machine_xt_laserxt_common_init(const machine_t *model,int is_lxt3) -{ - machine_common_init(model); - - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_xt_device); - - nmi_init(); - standalone_gameport_type = &gameport_200_device; - - device_add(is_lxt3 ? &lxt3_device : &laserxt_device); - - device_add(&kbc_xt_lxt3_device); -} - -int -machine_xt_laserxt_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ltxt/27c64.bin", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - machine_xt_laserxt_common_init(model, 0); - - return ret; -} - -int -machine_xt_lxt3_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/lxt3/27c64d.bin", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - machine_xt_laserxt_common_init(model, 1); - - return ret; -} diff --git a/src/machine/m_xt_philips.c b/src/chipset/philips.c similarity index 74% rename from src/machine/m_xt_philips.c rename to src/chipset/philips.c index 273c856a5..d6f56c3c5 100644 --- a/src/machine/m_xt_philips.c +++ b/src/chipset/philips.c @@ -8,11 +8,9 @@ * * Emulation of the Philips XT-compatible machines. * - * - * * Authors: EngiNerd * - * Copyright 2020-2021 EngiNerd. + * Copyright 2020-2025 EngiNerd. */ #include #include @@ -148,60 +146,3 @@ const device_t philips_device = { .force_redraw = NULL, .config = NULL }; - -void -machine_xt_philips_common_init(const machine_t *model) -{ - machine_common_init(model); - - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - - nmi_init(); - - standalone_gameport_type = &gameport_200_device; - - device_add(&kbc_pc_device); - - device_add(&philips_device); - - device_add(&xta_hd20_device); -} - -int -machine_xt_p3105_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p3105/philipsnms9100.bin", - 0x000fc000, 16384, 0); - - if (bios_only || !ret) - return ret; - - machine_xt_philips_common_init(model); - - /* On-board FDC cannot be disabled */ - device_add(&fdc_xt_device); - - return ret; -} - -int -machine_xt_p3120_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p3120/philips_p3120.bin", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - machine_xt_philips_common_init(model); - - device_add(&gc100a_device); - - device_add(&fdc_at_device); - - return ret; -} diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt index 8fefb037a..12835e909 100644 --- a/src/device/CMakeLists.txt +++ b/src/device/CMakeLists.txt @@ -62,6 +62,7 @@ add_library(dev OBJECT smbus_sis5595.c tulip_jumper.c unittester.c + zenith_scratchpad.c ) if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT MSVC) diff --git a/src/device/mouse.c b/src/device/mouse.c index 2cf47c096..abde81246 100644 --- a/src/device/mouse.c +++ b/src/device/mouse.c @@ -676,8 +676,7 @@ mouse_reset(void) /* Clear local data. */ mouse_clear_coords(); mouse_clear_buttons(); - mouse_input_mode = 0; - mouse_timed = 1; + mouse_input_mode = 0; /* If no mouse configured, we're done. */ if (mouse_type == 0) @@ -686,8 +685,7 @@ mouse_reset(void) timer_add(&mouse_timer, mouse_timer_poll, NULL, 0); /* Poll at 100 Hz, the default of a PS/2 mouse. */ - sample_rate = 100.0; - timer_on_auto(&mouse_timer, 1000000.0 / sample_rate); + mouse_set_sample_rate(100.0); if ((mouse_type > 1) && (mouse_devices[mouse_type].device != NULL)) mouse_priv = device_add(mouse_devices[mouse_type].device); diff --git a/src/machine/m_xt_zenith.c b/src/device/zenith_scratchpad.c similarity index 55% rename from src/machine/m_xt_zenith.c rename to src/device/zenith_scratchpad.c index 7ff7aa171..0db40c3f0 100644 --- a/src/machine/m_xt_zenith.c +++ b/src/device/zenith_scratchpad.c @@ -47,6 +47,7 @@ #include <86box/io.h> #include <86box/video.h> #include <86box/plat_unused.h> +#include <86box/chipset.h> typedef struct { mem_mapping_t scratchpad_mapping; @@ -94,7 +95,7 @@ zenith_scratchpad_close(void *priv) free(dev); } -static const device_t zenith_scratchpad_device = { +const device_t zenith_scratchpad_device = { .name = "Zenith scratchpad RAM", .internal_name = "zenith_scratchpad", .flags = 0, @@ -107,104 +108,3 @@ static const device_t zenith_scratchpad_device = { .force_redraw = NULL, .config = NULL }; - -void -machine_zenith_init(const machine_t *model) -{ - machine_common_init(model); - - device_add(&zenith_scratchpad_device); - - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - - device_add(&kbc_xt_zenith_device); - - nmi_init(); -} - -/* - * Current bugs and limitations: - * - missing NVRAM implementation - */ -int -machine_xt_z184_init(const machine_t *model) -{ - lpt_t *lpt = NULL; - int ret; - - ret = bios_load_linear("roms/machines/zdsupers/z184m v3.1d.10d", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - machine_zenith_init(model); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_xt_device); - - lpt = device_add_inst(&lpt_port_device, 1); - lpt_port_remove(lpt); - lpt_port_setup(lpt, LPT2_ADDR); - lpt_set_next_inst(255); - - device_add(&ns8250_device); - /* So that serial_standalone_init() won't do anything. */ - serial_set_next_inst(SERIAL_MAX - 1); - - device_add(&cga_device); - - return ret; -} - -int -machine_xt_z151_init(const machine_t *model) -{ - int ret; - ret = bios_load_linear("roms/machines/zdsz151/444-229-18.bin", - 0x000fc000, 32768, 0); - if (ret) { - bios_load_aux_linear("roms/machines/zdsz151/444-260-18.bin", - 0x000f8000, 16384, 0); - } - - if (bios_only || !ret) - return ret; - - machine_zenith_init(model); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_xt_tandy_device); - - return ret; -} - -/* - * Current bugs and limitations: - * - Memory board support for EMS currently missing - */ -int -machine_xt_z159_init(const machine_t *model) -{ - lpt_t *lpt = NULL; - int ret; - - ret = bios_load_linear("roms/machines/zdsz159/z159m v2.9e.10d", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - machine_zenith_init(model); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_xt_tandy_device); - - /* parallel port is on the memory board */ - lpt = device_add_inst(&lpt_port_device, 1); - lpt_port_remove(lpt); - lpt_port_setup(lpt, LPT2_ADDR); - lpt_set_next_inst(255); - - return ret; -} diff --git a/src/disk/CMakeLists.txt b/src/disk/CMakeLists.txt index 1cccfe2da..9b8d72f54 100644 --- a/src/disk/CMakeLists.txt +++ b/src/disk/CMakeLists.txt @@ -23,6 +23,7 @@ add_library(hdd OBJECT hdc_st506_xt.c hdc_st506_at.c hdc_xta.c + hdc_xta_ps1.c hdc_esdi_at.c hdc_esdi_mca.c hdc_xtide.c diff --git a/src/machine/m_ps1_hdc.c b/src/disk/hdc_xta_ps1.c similarity index 100% rename from src/machine/m_ps1_hdc.c rename to src/disk/hdc_xta_ps1.c diff --git a/src/include/86box/chipset.h b/src/include/86box/chipset.h index fe161070b..10d1fa471 100644 --- a/src/include/86box/chipset.h +++ b/src/include/86box/chipset.h @@ -42,6 +42,8 @@ extern const device_t amd640_device; extern const device_t isa486c_device; /* Compaq */ +extern const device_t compaq_device; + extern const device_t compaq_386_device; extern const device_t compaq_genoa_device; @@ -64,6 +66,9 @@ extern const device_t cs4031_device; extern const device_t gc100_device; extern const device_t gc100a_device; +/* GRiDcase */ +extern const device_t grid1520_device; + /* Headland */ extern const device_t headland_gc10x_device; extern const device_t headland_gc113_device; @@ -114,6 +119,10 @@ extern const device_t slc90e66_device; extern const device_t ioapic_device; +/* VTech */ +extern const device_t laserxt_device; +extern const device_t lxt3_device; + /* Olivetti */ extern const device_t olivetti_eva_device; @@ -138,6 +147,9 @@ extern const device_t opti895_device; extern const device_t opti5x7_device; extern const device_t opti5x7_pci_device; +/* Philips */ +extern const device_t philips_device; + /* SiS */ extern const device_t rabbit_device; extern const device_t sis_85c401_device; @@ -214,4 +226,6 @@ extern const device_t phoenix_486_jumper_device; extern const device_t phoenix_486_jumper_pci_device; extern const device_t radisys_config_device; + +extern const device_t zenith_scratchpad_device; #endif /*EMU_CHIPSET_H*/ diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 56870cb1d..0afa881e2 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -448,41 +448,57 @@ extern uint32_t machine_handle_gpio_acpi(uint8_t write, uint32_t val); extern void machine_common_init(const machine_t *); /* m_amstrad.c */ +#ifdef EMU_DEVICE_H +extern const device_t vid_1512_device; +#endif extern int machine_pc1512_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vid_1640_device; +#endif extern int machine_pc1640_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vid_200_device; +#endif extern int machine_pc200_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vid_ppc512_device; +#endif extern int machine_ppc512_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vid_pc2086_device; +#endif extern int machine_pc2086_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vid_pc3086_device; +#endif extern int machine_pc3086_init(const machine_t *); -/* m_at.c */ -extern void machine_at_common_init_ex(const machine_t *, int type); -extern void machine_at_common_init(const machine_t *); -extern void machine_at_init(const machine_t *); -extern void machine_at_ps2_init(const machine_t *); -extern void machine_at_common_ide_init(const machine_t *); -extern void machine_at_ibm_common_ide_init(const machine_t *); -extern void machine_at_ide_init(const machine_t *); -extern void machine_at_ps2_ide_init(const machine_t *); - -extern int machine_at_ibm_init(const machine_t *); - -// IBM AT with custom BIOS -extern int machine_at_ibmatami_init(const machine_t *); // IBM AT with AMI BIOS -extern int machine_at_ibmatpx_init(const machine_t *); // IBM AT with Phoenix BIOS -extern int machine_at_ibmatquadtel_init(const machine_t *); // IBM AT with Quadtel BIOS - -extern int machine_at_ibmxt286_init(const machine_t *); - -extern int machine_at_pb286_init(const machine_t *); - -extern int machine_at_siemens_init(const machine_t *); // Siemens PCD-2L. N82330 discrete machine. It segfaults in some places - /* m_at_286.c */ /* ISA */ +#ifdef EMU_DEVICE_H +extern const device_t ibmat_device; +#endif +extern int machine_at_ibmat_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t ibmxt286_device; +#endif +extern int machine_at_ibmxt286_init(const machine_t *); +/* IBM AT with AMI BIOS */ +extern int machine_at_ibmatami_init(const machine_t *); +extern int machine_at_cmdpc_init(const machine_t *); +extern int machine_at_portableii_init(const machine_t *); +extern int machine_at_portableiii_init(const machine_t *); +extern int machine_at_grid1520_init(const machine_t *); extern int machine_at_mr286_init(const machine_t *); extern int machine_at_pc8_init(const machine_t *); extern int machine_at_m290_init(const machine_t *); +/* IBM AT with Phoenix BIOS */ +extern int machine_at_ibmatpx_init(const machine_t *); +/* IBM AT with Quadtel BIOS */ +extern int machine_at_ibmatquadtel_init(const machine_t *); +extern int machine_at_pb286_init(const machine_t *); +/* Siemens PCD-2L. N82330 discrete machine. It segfaults in some places */ +extern int machine_at_siemens_init(const machine_t *); /* C&T PC/AT */ extern int machine_at_dells200_init(const machine_t *); @@ -521,6 +537,9 @@ extern int machine_at_pc916sx_init(const machine_t *); extern int machine_at_quadt386sx_init(const machine_t *); /* ACC 2036 */ +#ifdef EMU_DEVICE_H +extern const device_t pbl300sx_device; +#endif extern int machine_at_pbl300sx_init(const machine_t *); /* ALi M1217 */ @@ -553,6 +572,9 @@ extern int machine_at_awardsx_init(const machine_t *); /* SCAMP */ extern int machine_at_cmdsl386sx25_init(const machine_t *); extern int machine_at_dataexpert386sx_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t dells333sl_device; +#endif extern int machine_at_dells333sl_init(const machine_t *); extern int machine_at_spc6033p_init(const machine_t *); @@ -567,520 +589,722 @@ extern int machine_at_wd76c10_init(const machine_t *); extern int machine_at_pja511m_init(const machine_t *); extern int machine_at_prox1332_init(const machine_t *); +/* m_at_386dx.c */ +/* ISA */ +extern int machine_at_deskpro386_init(const machine_t *); +extern int machine_at_deskpro386_05_1988_init(const machine_t *); +extern int machine_at_portableiii386_init(const machine_t *); +extern int machine_at_micronics386_init(const machine_t *); +extern int machine_at_micronics386px_init(const machine_t *); + +/* ACC 2168 */ +extern int machine_at_acc386_init(const machine_t *); + +/* C&T 386/AT */ +extern int machine_at_ecs386_init(const machine_t *); +extern int machine_at_spc6000a_init(const machine_t *); +extern int machine_at_tandy4000_init(const machine_t *); + +/* ALi M1429 */ +extern int machine_at_ecs386v_init(const machine_t *); + +/* OPTi 391 */ +extern int machine_at_dataexpert386wb_init(const machine_t *); + +/* OPTi 495SLC */ +extern int machine_at_opti495_init(const machine_t *); + +/* SiS 310 */ +extern int machine_at_asus3863364k_init(const machine_t *); +extern int machine_at_asus386_init(const machine_t *); + +/* m_at_486slc.c */ +/* OPTi 283 */ +extern int machine_at_rycleopardlx_init(const machine_t *); + /* m_at_386dx_486.c */ -/* Note to jriwanek: When merging this into my branch, please make - sure this appear here (and in the .c file) in the order and position - in which they appear in the machine table. */ -extern int machine_at_dataexpert386wb_init(const machine_t *); -extern int machine_at_isa486c_init(const machine_t *); -extern int machine_at_genoa486_init(const machine_t *); -extern int machine_at_ga486l_init(const machine_t *); -extern int machine_at_cobalt_init(const machine_t *); -extern int machine_at_cougar_init(const machine_t *); +/* ALi M1429G */ +extern int machine_at_exp4349_init(const machine_t *); -extern int machine_at_acc386_init(const machine_t *); -extern int machine_at_asus3863364k_init(const machine_t *); -extern int machine_at_asus386_init(const machine_t *); -extern int machine_at_ecs386_init(const machine_t *); -extern int machine_at_spc6000a_init(const machine_t *); -extern int machine_at_micronics386_init(const machine_t *); -extern int machine_at_micronics386px_init(const machine_t *); -extern int machine_at_ecs386v_init(const machine_t *); -extern int machine_at_tandy4000_init(const machine_t *); +/* OPTi 495SX */ +extern int machine_at_c747_init(const machine_t *); +extern int machine_at_opti495_ami_init(const machine_t *); +extern int machine_at_opti495_mr_init(const machine_t *); -extern int machine_at_rycleopardlx_init(const machine_t *); +/* m_at_common.c */ +extern void machine_at_common_init_ex(const machine_t *, int type); +extern void machine_at_common_init(const machine_t *); +extern void machine_at_init(const machine_t *); +extern void machine_at_ps2_init(const machine_t *); +extern void machine_at_common_ide_init(const machine_t *); +extern void machine_at_ibm_common_ide_init(const machine_t *); +extern void machine_at_ide_init(const machine_t *); +extern void machine_at_ps2_ide_init(const machine_t *); -extern int machine_at_486vchd_init(const machine_t *); +/* m_at_socket1.c */ +/* CS4031 */ +extern int machine_at_cs4031_init(const machine_t *); -extern int machine_at_cs4031_init(const machine_t *); +/* OPTi 381 */ +extern int machine_at_ga486l_init(const machine_t *); -extern int machine_at_pb410a_init(const machine_t *); +/* OPTi 498 */ +extern int machine_at_mvi486_init(const machine_t *); -extern int machine_at_decpclpv_init(const machine_t *); -extern int machine_at_dell466np_init(const machine_t *); +/* SiS 401 */ +extern int machine_at_isa486_init(const machine_t *); +extern int machine_at_sis401_init(const machine_t *); -extern int machine_at_acerv10_init(const machine_t *); +/* SiS 460 */ +extern int machine_at_av4_init(const machine_t *); -extern int machine_at_acera1g_init(const machine_t *); -extern int machine_at_ali1429_init(const machine_t *); -extern int machine_at_winbios1429_init(const machine_t *); +/* SiS 471 */ +extern int machine_at_advantage40xxd_init(const machine_t *); -extern int machine_at_opti495_init(const machine_t *); -extern int machine_at_opti495_ami_init(const machine_t *); -extern int machine_at_opti495_mr_init(const machine_t *); -extern int machine_at_c747_init(const machine_t *); -extern int machine_at_exp4349_init(const machine_t *); +/* Symphony SL42C460 */ +extern int machine_at_dtk461_init(const machine_t *); -extern int machine_at_vect486vl_init(const machine_t *); -extern int machine_at_d824_init(const machine_t *); -extern int machine_at_tuliptc38_init(const machine_t *); -extern int machine_at_martin_init(const machine_t *); +/* VIA VT82C495 */ +extern int machine_at_486vchd_init(const machine_t *); -extern int machine_at_403tg_init(const machine_t *); -extern int machine_at_403tg_d_init(const machine_t *); -extern int machine_at_403tg_d_mr_init(const machine_t *); -extern int machine_at_pb450_init(const machine_t *); -extern int machine_at_pb450_init(const machine_t *); -extern int machine_at_aptiva510_init(const machine_t *); -extern int machine_at_pc330_6573_init(const machine_t *); -extern int machine_at_mvi486_init(const machine_t *); +/* VLSI 82C480 */ +extern int machine_at_vect486vl_init(const machine_t *); -extern int machine_at_dtk461_init(const machine_t *); -extern int machine_at_sis401_init(const machine_t *); -extern int machine_at_isa486_init(const machine_t *); -extern int machine_at_av4_init(const machine_t *); -extern int machine_at_advantage40xxd_init(const machine_t *); -extern int machine_at_valuepoint433_init(const machine_t *); +/* VLSI 82C481 */ +extern int machine_at_d824_init(const machine_t *); -extern int machine_at_vli486sv2g_init(const machine_t *); -extern int machine_at_ami471_init(const machine_t *); -extern int machine_at_dtk486_init(const machine_t *); -extern int machine_at_px471_init(const machine_t *); -extern int machine_at_win471_init(const machine_t *); -extern int machine_at_pci400ca_init(const machine_t *); -extern int machine_at_vi15g_init(const machine_t *); -extern int machine_at_greenb_init(const machine_t *); -extern int machine_at_4gpv5_init(const machine_t *); +/* VLSI 82C486 */ +extern int machine_at_tuliptc38_init(const machine_t *); -extern int machine_at_r418_init(const machine_t *); -extern int machine_at_ls486e_init(const machine_t *); -extern int machine_at_4dps_init(const machine_t *); -extern int machine_at_ms4144_init(const machine_t *); -extern int machine_at_acerp3_init(const machine_t *); -extern int machine_at_4saw2_init(const machine_t *); -extern int machine_at_m4li_init(const machine_t *); -extern int machine_at_alfredo_init(const machine_t *); -extern int machine_at_amis76_init(const machine_t *); -extern int machine_at_ninja_init(const machine_t *); -extern int machine_at_bat4ip3e_init(const machine_t *); -extern int machine_at_486pi_init(const machine_t *); -extern int machine_at_sb486p_init(const machine_t *); -extern int machine_at_486sp3_init(const machine_t *); -extern int machine_at_486sp3c_init(const machine_t *); -extern int machine_at_486sp3g_init(const machine_t *); -extern int machine_at_sb486pv_init(const machine_t *); -extern int machine_at_486ap4_init(const machine_t *); -extern int machine_at_g486vpa_init(const machine_t *); -extern int machine_at_486vipio2_init(const machine_t *); -extern int machine_at_abpb4_init(const machine_t *); -extern int machine_at_win486pci_init(const machine_t *); -extern int machine_at_ms4145_init(const machine_t *); -extern int machine_at_sbc490_init(const machine_t *); -extern int machine_at_tf486_init(const machine_t *); -extern int machine_at_arb1476_init(const machine_t *); +/* ZyMOS Poach */ +extern int machine_at_isa486c_init(const machine_t *); +extern int machine_at_genoa486_init(const machine_t *); -extern int machine_at_pci400cb_init(const machine_t *); -extern int machine_at_g486ip_init(const machine_t *); +/* m_at_socket2.c */ +/* ACC 2168 */ +extern int machine_at_pb410a_init(const machine_t *); -extern int machine_at_itoxstar_init(const machine_t *); -extern int machine_at_arb1423c_init(const machine_t *); -extern int machine_at_arb1479_init(const machine_t *); -extern int machine_at_iach488_init(const machine_t *); -extern int machine_at_pcm9340_init(const machine_t *); -extern int machine_at_pcm5330_init(const machine_t *); +/* ALi M1429G */ +extern int machine_at_acera1g_init(const machine_t *); +extern int machine_at_winbios1429_init(const machine_t *); +extern int machine_at_ali1429_init(const machine_t *); -extern int machine_at_84xxuuda_init(const machine_t *); -extern int machine_at_ecs486_init(const machine_t *); -extern int machine_at_hot433a_init(const machine_t *); -extern int machine_at_pl4600c_init(const machine_t *); -extern int machine_at_atc1415_init(const machine_t *); -extern int machine_at_actionpc2600_init(const machine_t *); -extern int machine_at_actiontower8400_init(const machine_t *); -extern int machine_at_m919_init(const machine_t *); -extern int machine_at_spc7700plw_init(const machine_t *); -extern int machine_at_ms4134_init(const machine_t *); -extern int machine_at_tg486gp_init(const machine_t *); -extern int machine_at_tg486g_init(const machine_t *); -extern int machine_at_dvent4xx_init(const machine_t *); -extern int machine_at_ecsal486_init(const machine_t *); -extern int machine_at_ap4100aa_init(const machine_t *); -extern int machine_at_atc1762_init(const machine_t *); +/* i420TX */ +extern int machine_at_pci400ca_init(const machine_t *); -/* m_at_commodore.c */ -extern int machine_at_cmdpc_init(const machine_t *); +/* IMS 8848 */ +extern int machine_at_g486ip_init(const machine_t *); -/* m_at_compaq.c */ -extern int machine_at_portableii_init(const machine_t *); -extern int machine_at_portableiii_init(const machine_t *); -extern int machine_at_portableiii386_init(const machine_t *); -extern int machine_at_deskpro386_init(const machine_t *); -extern int machine_at_deskpro386_05_1988_init(const machine_t *); +/* OPTi 499 */ +extern int machine_at_cobalt_init(const machine_t *); +extern int machine_at_cougar_init(const machine_t *); + +/* SiS 461 */ +extern int machine_at_decpclpv_init(const machine_t *); +extern int machine_at_dell466np_init(const machine_t *); +extern int machine_at_valuepoint433_init(const machine_t *); + +/* VLSI 82C480 */ +extern int machine_at_martin_init(const machine_t *); + +/* m_at_socket3.c */ +/* ALi M1429G */ +extern int machine_at_atc1762_init(const machine_t *); +extern int machine_at_ecsal486_init(const machine_t *); +extern int machine_at_ap4100aa_init(const machine_t *); + +/* Contaq 82C596A */ +extern int machine_at_4gpv5_init(const machine_t *); + +/* Contaq 82C597 */ +extern int machine_at_greenb_init(const machine_t *); + +/* OPTi 895 */ +extern int machine_at_403tg_init(const machine_t *); +extern int machine_at_403tg_d_init(const machine_t *); +extern int machine_at_403tg_d_mr_init(const machine_t *); + +/* SiS 461 */ +extern int machine_at_acerv10_init(const machine_t *); + +/* SiS 471 */ +extern int machine_at_win471_init(const machine_t *); +extern int machine_at_vi15g_init(const machine_t *); +extern int machine_at_vli486sv2g_init(const machine_t *); +extern int machine_at_dvent4xx_init(const machine_t *); +extern int machine_at_dtk486_init(const machine_t *); +extern int machine_at_ami471_init(const machine_t *); +extern int machine_at_px471_init(const machine_t *); +extern int machine_at_tg486g_init(const machine_t *); + +/* m_at_socket3_pci.c */ +/* ALi M1429G */ +extern int machine_at_ms4134_init(const machine_t *); +extern int machine_at_tg486gp_init(const machine_t *); + +/* ALi M1489 */ +extern int machine_at_sbc490_init(const machine_t *); +extern int machine_at_abpb4_init(const machine_t *); +extern int machine_at_arb1476_init(const machine_t *); +extern int machine_at_win486pci_init(const machine_t *); +extern int machine_at_tf486_init(const machine_t *); +extern int machine_at_ms4145_init(const machine_t *); + +/* OPTi 802G */ +extern int machine_at_aptiva510_init(const machine_t *); +extern int machine_at_pc330_6573_init(const machine_t *); + +/* OPTi 895 */ +#ifdef EMU_DEVICE_H +extern const device_t pb450_device; +#endif +extern int machine_at_pb450_init(const machine_t *); + +/* i420EX */ +extern int machine_at_486pi_init(const machine_t *); +extern int machine_at_bat4ip3e_init(const machine_t *); +extern int machine_at_486ap4_init(const machine_t *); +extern int machine_at_ninja_init(const machine_t *); +extern int machine_at_sb486p_init(const machine_t *); + +/* i420TX */ +extern int machine_at_amis76_init(const machine_t *); +extern int machine_at_486sp3_init(const machine_t *); +extern int machine_at_alfredo_init(const machine_t *); + +/* i420ZX */ +extern int machine_at_486sp3g_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t sb486pv_device; +#endif +extern int machine_at_sb486pv_init(const machine_t *); + +/* IMS 8848 */ +extern int machine_at_pci400cb_init(const machine_t *); + +/* SiS 496 */ +extern int machine_at_acerp3_init(const machine_t *); +extern int machine_at_486sp3c_init(const machine_t *); +extern int machine_at_ls486e_init(const machine_t *); +extern int machine_at_m4li_init(const machine_t *); +extern int machine_at_ms4144_init(const machine_t *); +extern int machine_at_r418_init(const machine_t *); +extern int machine_at_4saw2_init(const machine_t *); +extern int machine_at_4dps_init(const machine_t *); + +/* UMC 8881 */ +extern int machine_at_atc1415_init(const machine_t *); +extern int machine_at_84xxuuda_init(const machine_t *); +extern int machine_at_pl4600c_init(const machine_t *); +extern int machine_at_ecs486_init(const machine_t *); +extern int machine_at_actionpc2600_init(const machine_t *); +extern int machine_at_actiontower8400_init(const machine_t *); +extern int machine_at_m919_init(const machine_t *); +extern int machine_at_spc7700plw_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t hot433a_device; +#endif +extern int machine_at_hot433a_init(const machine_t *); + +/* VIA VT82C496G */ +extern int machine_at_g486vpa_init(const machine_t *); +extern int machine_at_486vipio2_init(const machine_t *); + +/* m_at_486_misc.c */ +/* STPC Client */ +extern int machine_at_itoxstar_init(const machine_t *); + +/* STPC Consumer-II */ +extern int machine_at_arb1423c_init(const machine_t *); +extern int machine_at_arb1479_init(const machine_t *); +extern int machine_at_iach488_init(const machine_t *); + +/* STPC Elite */ +extern int machine_at_pcm9340_init(const machine_t *); + +/* STPC Atlas */ +extern int machine_at_pcm5330_init(const machine_t *); /* m_at_socket4.c */ -extern void machine_at_premiere_common_init(const machine_t *, int); -extern void machine_at_award_common_init(const machine_t *); +/* i430LX */ +#ifdef EMU_DEVICE_H +extern const device_t v12p_device; +#endif +extern int machine_at_v12p_init(const machine_t *); +extern int machine_at_ambradp60_init(const machine_t *); +extern int machine_at_excaliburpci_init(const machine_t *); +extern int machine_at_p5mp3_init(const machine_t *); +extern int machine_at_dellxp60_init(const machine_t *); +extern int machine_at_opti560l_init(const machine_t *); +extern void machine_at_award_common_init(const machine_t *); +extern int machine_at_586is_init(const machine_t *); +extern int machine_at_valuepointp60_init(const machine_t *); +extern void machine_at_premiere_common_init(const machine_t *, int); +extern int machine_at_revenge_init(const machine_t *); +extern int machine_at_m5pi_init(const machine_t *); +extern int machine_at_pb520r_init(const machine_t *); -extern void machine_at_sp4_common_init(const machine_t *model); +/* OPTi 597 */ +extern int machine_at_excalibur_init(const machine_t *); +extern int machine_at_globalyst330_p5_init(const machine_t *); +extern int machine_at_p5vl_init(const machine_t *); -extern int machine_at_v12p_init(const machine_t *); -extern int machine_at_excaliburpci_init(const machine_t *); -extern int machine_at_p5mp3_init(const machine_t *); -extern int machine_at_dellxp60_init(const machine_t *); -extern int machine_at_opti560l_init(const machine_t *); -extern int machine_at_ambradp60_init(const machine_t *); -extern int machine_at_valuepointp60_init(const machine_t *); -extern int machine_at_revenge_init(const machine_t *); -extern int machine_at_586is_init(const machine_t *); -extern int machine_at_pb520r_init(const machine_t *); -extern int machine_at_m5pi_init(const machine_t *); - -extern int machine_at_excalibur_init(const machine_t *); - -extern int machine_at_globalyst330_p5_init(const machine_t *); -extern int machine_at_p5vl_init(const machine_t *); - -extern int machine_at_excaliburpci2_init(const machine_t *); -extern int machine_at_p5sp4_init(const machine_t *); +/* SiS 501 */ +extern int machine_at_excaliburpci2_init(const machine_t *); +extern void machine_at_sp4_common_init(const machine_t *model); +extern int machine_at_p5sp4_init(const machine_t *); /* m_at_socket5.c */ -extern int machine_at_plato_init(const machine_t *); -extern int machine_at_dellplato_init(const machine_t *); -extern int machine_at_d842_init(const machine_t *); -extern int machine_at_ambradp90_init(const machine_t *); -extern int machine_at_p54np4_init(const machine_t *); -extern int machine_at_586ip_init(const machine_t *); -extern int machine_at_tek932_init(const machine_t *); +/* i430NX */ +extern int machine_at_ambradp90_init(const machine_t *); +extern int machine_at_p54np4_init(const machine_t *); +extern int machine_at_dellplato_init(const machine_t *); +extern int machine_at_586ip_init(const machine_t *); +extern int machine_at_plato_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t d842_device; +#endif +extern int machine_at_d842_init(const machine_t *); +extern int machine_at_tek932_init(const machine_t *); -extern int machine_at_acerv30_init(const machine_t *); -extern int machine_at_apollo_init(const machine_t *); -extern int machine_at_optiplexgxl_init(const machine_t *); -extern int machine_at_zappa_init(const machine_t *); -extern int machine_at_powermatev_init(const machine_t *); -extern int machine_at_hawk_init(const machine_t *); -extern int machine_at_pt2000_init(const machine_t *); +/* i430FX */ +extern int machine_at_acerv30_init(const machine_t *); +extern int machine_at_apollo_init(const machine_t *); +extern int machine_at_optiplexgxl_init(const machine_t *); +extern int machine_at_pt2000_init(const machine_t *); +extern int machine_at_zappa_init(const machine_t *); +extern int machine_at_powermatev_init(const machine_t *); +extern int machine_at_hawk_init(const machine_t *); -extern int machine_at_pat54pv_init(const machine_t *); +/* OPTi 597 */ +extern int machine_at_ncselp90_init(const machine_t *); +extern int machine_at_hot543_init(const machine_t *); +extern int machine_at_pat54pv_init(const machine_t *); -extern int machine_at_hot543_init(const machine_t *); -extern int machine_at_ncselp90_init(const machine_t *); +/* SiS 501 */ +extern int machine_at_p54sp4_init(const machine_t *); +extern int machine_at_sq588_init(const machine_t *); +extern int machine_at_p54sps_init(const machine_t *); +extern int machine_at_ms5109_init(const machine_t *); -extern int machine_at_p54sp4_init(const machine_t *); -extern int machine_at_sq588_init(const machine_t *); -extern int machine_at_p54sps_init(const machine_t *); +/* SiS 5501 */ +extern int machine_at_torino_init(const machine_t *); -extern int machine_at_ms5109_init(const machine_t *); -extern int machine_at_torino_init(const machine_t *); - -extern int machine_at_hot539_init(const machine_t *); +/* UMC 889x */ +extern int machine_at_hot539_init(const machine_t *); /* m_at_socket7_3v.c */ -extern int machine_at_p54tp4xe_init(const machine_t *); -extern int machine_at_p54tp4xe_mr_init(const machine_t *); -extern int machine_at_exp8551_init(const machine_t *); -extern int machine_at_gw2katx_init(const machine_t *); -extern int machine_at_thor_init(const machine_t *); -extern int machine_at_mrthor_init(const machine_t *); -extern uint32_t machine_at_endeavor_gpio_handler(uint8_t write, uint32_t val); -extern int machine_at_endeavor_init(const machine_t *); -extern int machine_at_ms5119_init(const machine_t *); -extern int machine_at_pb640_init(const machine_t *); -extern int machine_at_mb500n_init(const machine_t *); -extern int machine_at_fmb_init(const machine_t *); +/* i430FX */ +extern int machine_at_p54tp4xe_init(const machine_t *); +extern int machine_at_p54tp4xe_mr_init(const machine_t *); +extern int machine_at_exp8551_init(const machine_t *); +extern int machine_at_gw2katx_init(const machine_t *); +extern int machine_at_vectra54_init(const machine_t *); +extern int machine_at_thor_init(const machine_t *); +extern int machine_at_mrthor_init(const machine_t *); +extern uint32_t machine_at_endeavor_gpio_handler(uint8_t write, uint32_t val); +extern int machine_at_endeavor_init(const machine_t *); +extern int machine_at_ms5119_init(const machine_t *); +extern int machine_at_pb640_init(const machine_t *); +extern int machine_at_mb500n_init(const machine_t *); +extern int machine_at_fmb_init(const machine_t *); -extern int machine_at_acerm3a_init(const machine_t *); -extern int machine_at_ap53_init(const machine_t *); -extern int machine_at_8500tuc_init(const machine_t *); -extern int machine_at_d943_init(const machine_t *); -extern int machine_at_p55t2s_init(const machine_t *); +/* i430HX */ +extern int machine_at_acerv35n_init(const machine_t *); +extern int machine_at_ap53_init(const machine_t *); +extern int machine_at_8500tuc_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t d943_device; +#endif +extern int machine_at_d943_init(const machine_t *); -extern int machine_at_p5vxb_init(const machine_t *); -extern int machine_at_gw2kma_init(const machine_t *); +/* i430VX */ +extern int machine_at_gw2kma_init(const machine_t *); -extern int machine_at_ap5s_init(const machine_t *); -extern int machine_at_pc140_6260_init(const machine_t *); -extern int machine_at_ms5124_init(const machine_t *); -extern int machine_at_amis727_init(const machine_t *); -extern int machine_at_vectra54_init(const machine_t *); +/* SiS 5501 */ +#ifdef EMU_DEVICE_H +extern const device_t c5sbm2_device; +#endif +extern int machine_at_5sbm2_init(const machine_t *); -extern int machine_at_5sbm2_init(const machine_t *); +/* SiS 5511 */ +extern int machine_at_amis727_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t ap5s_device; +#endif +extern int machine_at_ap5s_init(const machine_t *); +extern int machine_at_pc140_6260_init(const machine_t *); +extern int machine_at_ms5124_init(const machine_t *); /* m_at_socket7.c */ -extern void machine_at_optiplex_21152_init(void); +/* i430HX */ +extern int machine_at_acerm3a_init(const machine_t *); +extern int machine_at_p55t2p4_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern void machine_at_p65up5_common_init(const machine_t *, const device_t *northbridge); +#endif +extern int machine_at_p65up5_cp55t2d_init(const machine_t *); +extern int machine_at_cu430hx_init(const machine_t *); +extern int machine_at_tc430hx_init(const machine_t *); +extern int machine_at_m7shi_init(const machine_t *); +extern int machine_at_epc2102_init(const machine_t *); +extern int machine_at_pcv90_init(const machine_t *); +extern int machine_at_p55t2s_init(const machine_t *); +extern int machine_at_equium5200_init(const machine_t *); +extern int machine_at_infinia7200_init(const machine_t *); -extern int machine_at_acerv35n_init(const machine_t *); -extern int machine_at_p55t2p4_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_infinia7200_init(const machine_t *); -extern int machine_at_cu430hx_init(const machine_t *); -extern int machine_at_equium5200_init(const machine_t *); -extern int machine_at_pcv90_init(const machine_t *); -extern int machine_at_p65up5_cp55t2d_init(const machine_t *); -extern int machine_at_epc2102_init(const machine_t *); +/* i430VX */ +extern int machine_at_ap5vm_init(const machine_t *); +extern int machine_at_p55tvp4_init(const machine_t *); +extern int machine_at_5ivg_init(const machine_t *); +extern int machine_at_8500tvxa_init(const machine_t *); +extern int machine_at_presario2240_init(const machine_t *); +extern int machine_at_presario4500_init(const machine_t *); +extern int machine_at_dellhannibalp_init(const machine_t *); +extern int machine_at_p5vxb_init(const machine_t *); +extern int machine_at_p55va_init(const machine_t *); +extern int machine_at_gw2kte_init(const machine_t *); +extern int machine_at_brio80xx_init(const machine_t *); +extern int machine_at_pb680_init(const machine_t *); +extern int machine_at_pb810_init(const machine_t *); +extern int machine_at_mb520n_init(const machine_t *); +extern int machine_at_i430vx_init(const machine_t *); -extern int machine_at_ap5vm_init(const machine_t *); -extern int machine_at_p55tvp4_init(const machine_t *); -extern int machine_at_5ivg_init(const machine_t *); -extern int machine_at_8500tvxa_init(const machine_t *); -extern int machine_at_presario2240_init(const machine_t *); -extern int machine_at_presario4500_init(const machine_t *); -extern int machine_at_dellhannibalp_init(const machine_t *); -extern int machine_at_p55va_init(const machine_t *); -extern int machine_at_brio80xx_init(const machine_t *); -extern int machine_at_pb680_init(const machine_t *); -extern int machine_at_pb810_init(const machine_t *); -extern int machine_at_mb520n_init(const machine_t *); -extern int machine_at_i430vx_init(const machine_t *); -extern int machine_at_gw2kte_init(const machine_t *); +/* i430TX */ +extern int machine_at_nupro592_init(const machine_t *); +extern int machine_at_tx97_init(const machine_t *); +extern void machine_at_optiplex_21152_init(void); +extern int machine_at_optiplexgn_init(const machine_t *); +extern int machine_at_tomahawk_init(const machine_t *); +extern int machine_at_ym430tx_init(const machine_t *); +extern int machine_at_thunderbolt_init(const machine_t *); +extern int machine_at_ma23c_init(const machine_t *); +extern int machine_at_an430tx_init(const machine_t *); +extern int machine_at_mb540n_init(const machine_t *); +extern int machine_at_56a5_init(const machine_t *); +extern int machine_at_p5mms98_init(const machine_t *); +extern int machine_at_richmond_init(const machine_t *); -extern int machine_at_ma23c_init(const machine_t *); -extern int machine_at_nupro592_init(const machine_t *); -extern int machine_at_tx97_init(const machine_t *); -extern int machine_at_optiplexgn_init(const machine_t *); -extern int machine_at_ym430tx_init(const machine_t *); -extern int machine_at_thunderbolt_init(const machine_t *); -extern int machine_at_an430tx_init(const machine_t *); -extern int machine_at_mb540n_init(const machine_t *); -extern int machine_at_56a5_init(const machine_t *); -extern int machine_at_p5mms98_init(const machine_t *); -extern int machine_at_richmond_init(const machine_t *); -extern int machine_at_tomahawk_init(const machine_t *); +/* VIA VPX */ +extern int machine_at_ficva502_init(const machine_t *); -extern int machine_at_ficva502_init(const machine_t *); +/* VIA VP3 */ +extern int machine_at_ficpa2012_init(const machine_t *); +extern int machine_at_via809ds_init(const machine_t *); -extern int machine_at_ficpa2012_init(const machine_t *); -extern int machine_at_via809ds_init(const machine_t *); +/* SiS 5571 */ +extern int machine_at_cb52xsi_init(const machine_t *); +extern int machine_at_ms5146_init(const machine_t *); +extern int machine_at_r534f_init(const machine_t *); -extern int machine_at_r534f_init(const machine_t *); -extern int machine_at_ms5146_init(const machine_t *); -extern int machine_at_cb52xsi_init(const machine_t *); +/* SiS 5581 */ +extern int machine_at_sp97xv_init(const machine_t *); +extern int machine_at_sq578_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 *); +/* SiS 5591 */ +extern int machine_at_ms5172_init(const machine_t *); -extern int machine_at_sp97xv_init(const machine_t *); -extern int machine_at_sq578_init(const machine_t *); - -extern int machine_at_ms5172_init(const machine_t *); +/* ALi ALADDiN IV+ */ +extern int machine_at_m5ata_init(const machine_t *); +extern int machine_at_ms5164_init(const machine_t *); +extern int machine_at_m560_init(const machine_t *); /* m_at_sockets7.c */ -extern int machine_at_p5a_init(const machine_t *); -extern int machine_at_m579_init(const machine_t *); -extern int machine_at_gwlucas_init(const machine_t *); -extern int machine_at_5aa_init(const machine_t *); -extern int machine_at_5ax_init(const machine_t *); +/* ALi ALADDiN V */ +extern int machine_at_p5a_init(const machine_t *); +extern int machine_at_m579_init(const machine_t *); +extern int machine_at_gwlucas_init(const machine_t *); +extern int machine_at_5aa_init(const machine_t *); +extern int machine_at_5ax_init(const machine_t *); -extern int machine_at_ax59pro_init(const machine_t *); -extern int machine_at_mvp3_init(const machine_t *); -extern int machine_at_ficva503a_init(const machine_t *); -extern int machine_at_5emapro_init(const machine_t *); -extern int machine_at_delhi3_init(const machine_t *); +/* VIA MVP3 */ +extern int machine_at_ax59pro_init(const machine_t *); +extern int machine_at_delhi3_init(const machine_t *); +extern int machine_at_mvp3_init(const machine_t *); +extern int machine_at_ficva503a_init(const machine_t *); +extern int machine_at_5emapro_init(const machine_t *); -extern int machine_at_5sg100_init(const machine_t *); +/* SiS 5591 */ +extern int machine_at_5sg100_init(const machine_t *); /* m_at_socket8.c */ -extern int machine_at_ap61_init(const machine_t *); -extern int machine_at_p6rp4_init(const machine_t *); - -extern int machine_at_686nx_init(const machine_t *); -extern int machine_at_acerv60n_init(const machine_t *); -extern int machine_at_lgibmx61_init(const machine_t *); -extern int machine_at_vs440fx_init(const machine_t *); -extern int machine_at_dellvenus_init(const machine_t *); -extern int machine_at_gw2kvenus_init(const machine_t *); -extern int machine_at_ap440fx_init(const machine_t *); -extern int machine_at_mb600n_init(const machine_t *); -extern int machine_at_8600ttc_init(const machine_t *); -extern int machine_at_m6mi_init(const machine_t *); +/* i450KX */ +extern int machine_at_ap61_init(const machine_t *); #ifdef EMU_DEVICE_H -extern void machine_at_p65up5_common_init(const machine_t *, const device_t *northbridge); +extern const device_t ficpo6000_device; #endif -extern int machine_at_p65up5_cp6nd_init(const machine_t *); +extern int machine_at_p6rp4_init(const machine_t *); +extern int machine_at_ficpo6000_init(const machine_t *); + +/* i440FX */ +extern int machine_at_acerv60n_init(const machine_t *); +extern int machine_at_p65up5_cp6nd_init(const machine_t *); +extern int machine_at_8600ttc_init(const machine_t *); +extern int machine_at_dellvenus_init(const machine_t *); +extern int machine_at_gw2kvenus_init(const machine_t *); +extern int machine_at_686nx_init(const machine_t *); +extern int machine_at_ap440fx_init(const machine_t *); +extern int machine_at_vs440fx_init(const machine_t *); +extern int machine_at_lgibmx61_init(const machine_t *); +extern int machine_at_m6mi_init(const machine_t *); +extern int machine_at_mb600n_init(const machine_t *); /* m_at_slot1.c */ -extern int machine_at_m729_init(const machine_t *); +/* ALi ALADDiN-PRO II */ +extern int machine_at_m729_init(const machine_t *); -extern int machine_at_acerv62x_init(const machine_t *); -extern int machine_at_p65up5_cpknd_init(const machine_t *); -extern int machine_at_kn97_init(const machine_t *); +/* i440FX */ +extern int machine_at_acerv62x_init(const machine_t *); +extern int machine_at_p65up5_cpknd_init(const machine_t *); +extern int machine_at_kn97_init(const machine_t *); -extern int machine_at_lx6_init(const machine_t *); -extern int machine_at_optiplexgxa_init(const machine_t *); -extern int machine_at_spitfire_init(const machine_t *); -extern int machine_at_ma30d_init(const machine_t *); +/* i440LX */ +extern int machine_at_lx6_init(const machine_t *); +extern int machine_at_optiplexgxa_init(const machine_t *); +extern int machine_at_spitfire_init(const machine_t *); +extern int machine_at_ma30d_init(const machine_t *); -extern int machine_at_p6i440e2_init(const machine_t *); +/* i440EX */ +extern int machine_at_p6i440e2_init(const machine_t *); -extern int machine_at_p2bls_init(const machine_t *); -extern int machine_at_lgibmx7g_init(const machine_t *); -extern int machine_at_p3bf_init(const machine_t *); -extern int machine_at_bf6_init(const machine_t *); -extern int machine_at_bx6_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_686bx_init(const machine_t *); -extern int machine_at_s1846_init(const machine_t *); -extern int machine_at_p6sba_init(const machine_t *); -extern int machine_at_ficka6130_init(const machine_t *); -extern int machine_at_p3v133_init(const machine_t *); -extern int machine_at_p3v4x_init(const machine_t *); -extern int machine_at_gt694va_init(const machine_t *); +/* i440BX */ +extern int machine_at_bf6_init(const machine_t *); +extern int machine_at_bx6_init(const machine_t *); +extern int machine_at_ax6bc_init(const machine_t *); +extern int machine_at_p2bls_init(const machine_t *); +extern int machine_at_p3bf_init(const machine_t *); +extern int machine_at_686bx_init(const machine_t *); +extern int machine_at_lgibmx7g_init(const machine_t *); +extern int machine_at_p6sba_init(const machine_t *); +extern int machine_at_s1846_init(const machine_t *); -extern int machine_at_vei8_init(const machine_t *); +/* i440ZX */ +extern int machine_at_vei8_init(const machine_t *); +extern int machine_at_ms6168_init(const machine_t *); +extern int machine_at_borapro_init(const machine_t *); -extern int machine_at_borapro_init(const machine_t *); -extern int machine_at_ms6168_init(const machine_t *); +/* SMSC VictoryBX-66 */ +extern int machine_at_atc6310bxii_init(const machine_t *); -extern int machine_at_p6f99_init(const machine_t *); -extern int machine_at_m747_init(const machine_t *); +/* VIA Apollo Pro */ +extern int machine_at_ficka6130_init(const machine_t *); + +/* VIA Apollo Pro 133 */ +extern int machine_at_p3v133_init(const machine_t *); + +/* VIA Apollo Pro 133A */ +extern int machine_at_p3v4x_init(const machine_t *); +extern int machine_at_gt694va_init(const machine_t *); + +/* SiS 5600 */ +extern int machine_at_p6f99_init(const machine_t *); +extern int machine_at_m747_init(const machine_t *); + +/* m_at_slot1_2.c */ +/* i440GX */ +extern int machine_at_fw6400gx_init(const machine_t *); + +/* m_at_slot1_socket370.c */ +/* i440BX */ +extern int machine_at_prosignias31x_bx_init(const machine_t *); +extern int machine_at_s1857_init(const machine_t *); + +/* VIA Apollo Pro 133 */ +extern int machine_at_p6bat_init(const machine_t *); /* m_at_slot2.c */ -extern int machine_at_6gxu_init(const machine_t *); -extern int machine_at_s2dge_init(const machine_t *); -extern int machine_at_fw6400gx_init(const machine_t *); +/* i440GX */ +extern int machine_at_6gxu_init(const machine_t *); +extern int machine_at_s2dge_init(const machine_t *); /* m_at_socket370.c */ -extern int machine_at_s370slm_init(const machine_t *); +/* i440LX */ +extern int machine_at_s370slm_init(const machine_t *); -extern int machine_at_cubx_init(const machine_t *); -extern int machine_at_atc7020bxii_init(const machine_t *); -extern int machine_at_m773_init(const machine_t *); -extern int machine_at_ambx133_init(const machine_t *); -extern int machine_at_awo671r_init(const machine_t *); -extern int machine_at_63a1_init(const machine_t *); -extern int machine_at_s370sba_init(const machine_t *); -extern int machine_at_apas3_init(const machine_t *); -extern int machine_at_cuv4xls_init(const machine_t *); -extern int machine_at_6via90ap_init(const machine_t *); -extern int machine_at_s1857_init(const machine_t *); -extern int machine_at_p6bap_init(const machine_t *); -extern int machine_at_p6bat_init(const machine_t *); -extern int machine_at_prosignias31x_bx_init(const machine_t *); -extern int machine_at_7sbb_init(const machine_t *); +/* i440BX */ +extern int machine_at_awo671r_init(const machine_t *); +extern int machine_at_ambx133_init(const machine_t *); +extern int machine_at_cubx_init(const machine_t *); + +/* i440ZX */ +extern int machine_at_63a1_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 *); + +/* VIA Apollo Pro */ +extern int machine_at_apas3_init(const machine_t *); + +/* VIA Apollo Pro 133 */ +extern int machine_at_p6bap_init(const machine_t *); + +/* VIA Apollo Pro 133A */ +extern int machine_at_6via90ap_init(const machine_t *); +extern int machine_at_cuv4xls_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 *); +extern int machine_at_vpc2007_init(const machine_t *); /* m_at_t3100e.c */ -extern int machine_at_t3100e_init(const machine_t *); - -/* m_at_grid.c */ -extern int machine_at_grid1520_init(const machine_t *); +extern int machine_at_t3100e_init(const machine_t *); /* m_elt.c */ extern int machine_elt_init(const machine_t *); /* m_europc.c */ -extern int machine_europc_init(const machine_t *); #ifdef EMU_DEVICE_H -extern const device_t europc_device; +extern const device_t europc_device; #endif +extern int machine_europc_init(const machine_t *); /* m_xt_olivetti.c */ -extern int machine_xt_m24_init(const machine_t *); -extern int machine_xt_m240_init(const machine_t *); -extern int machine_xt_m19_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t m19_vid_device; +#endif +extern int machine_xt_m19_init(const machine_t *); +extern int machine_xt_m24_init(const machine_t *); +extern int machine_xt_m240_init(const machine_t *); /* m_pcjr.c */ -extern int machine_pcjr_init(const machine_t *); - -/* m_pc5086.c */ -extern int machine_pc5086_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t pcjr_device; +#endif +extern int machine_pcjr_init(const machine_t *); /* m_ps1.c */ -extern int machine_ps1_m2011_init(const machine_t *); -extern int machine_ps1_m2121_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t ps1_2011_device; +#endif +extern int machine_ps1_m2011_init(const machine_t *); +extern int machine_ps1_m2121_init(const machine_t *); /* m_ps1_hdc.c */ #ifdef EMU_DEVICE_H -extern void ps1_hdc_inform(void *, uint8_t *); -extern const device_t ps1_hdc_device; +extern void ps1_hdc_inform(void *, uint8_t *); +extern const device_t ps1_hdc_device; #endif /* m_ps2_isa.c */ -extern int machine_ps2_m30_286_init(const machine_t *); +extern int machine_ps2_m30_286_init(const machine_t *); /* m_ps2_mca.c */ -extern int machine_ps2_model_50_init(const machine_t *); -extern int machine_ps2_model_60_init(const machine_t *); -extern int machine_ps2_model_55sx_init(const machine_t *); -extern int machine_ps2_model_65sx_init(const machine_t *); -extern int machine_ps2_model_70_type3_init(const machine_t *); -extern int machine_ps2_model_80_init(const machine_t *); -extern int machine_ps2_model_80_axx_init(const machine_t *); -extern int machine_ps2_model_70_type4_init(const machine_t *); -extern int machine_ps55_model_50t_init(const machine_t*); -extern int machine_ps55_model_50v_init(const machine_t*); +extern int machine_ps2_model_50_init(const machine_t *); +extern int machine_ps2_model_60_init(const machine_t *); +extern int machine_ps2_model_55sx_init(const machine_t *); +extern int machine_ps2_model_65sx_init(const machine_t *); +extern int machine_ps2_model_70_type3_init(const machine_t *); +extern int machine_ps2_model_80_init(const machine_t *); +extern int machine_ps2_model_80_axx_init(const machine_t *); +extern int machine_ps2_model_70_type4_init(const machine_t *); +extern int machine_ps55_model_50t_init(const machine_t*); +extern int machine_ps55_model_50v_init(const machine_t*); /* m_tandy.c */ extern int tandy1k_eeprom_read(void); -extern int machine_tandy1000sx_init(const machine_t *); -extern int machine_tandy1000hx_init(const machine_t *); -extern int machine_tandy1000sl2_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t tandy_1000sx_video_device; +#endif +extern int machine_tandy1000sx_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t tandy_1000hx_video_device; +#endif +extern int machine_tandy1000hx_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t tandy_1000sl_video_device; +#endif +extern int machine_tandy1000sl2_init(const machine_t *); /* m_v86p.c */ -extern int machine_v86p_init(const machine_t *); +extern int machine_v86p_init(const machine_t *); /* m_xt.c */ -extern int machine_pc_init(const machine_t *); -extern int machine_pc82_init(const machine_t *); - -extern int machine_xt_init(const machine_t *); -extern int machine_genxt_init(const machine_t *); - -extern int machine_xt86_init(const machine_t *); - -extern int machine_xt_americxt_init(const machine_t *); -extern int machine_xt_amixt_init(const machine_t *); -extern int machine_xt_ataripc3_init(const machine_t *); -extern int machine_xt_dtk_init(const machine_t *); -extern int machine_xt_jukopc_init(const machine_t *); -extern int machine_xt_openxt_init(const machine_t *); -extern int machine_xt_pcxt_init(const machine_t *); -extern int machine_xt_pxxt_init(const machine_t *); -extern int machine_xt_pc4i_init(const machine_t *); -extern int machine_xt_mpc1600_init(const machine_t *); -extern int machine_xt_pcspirit_init(const machine_t *); -extern int machine_xt_pc700_init(const machine_t *); -extern int machine_xt_pc500_init(const machine_t *); -extern int machine_xt_vendex_init(const machine_t *); -extern int machine_xt_znic_init(const machine_t *); -extern int machine_xt_glabios_init(const machine_t *); -extern int machine_xt_super16t_init(const machine_t *); -extern int machine_xt_super16te_init(const machine_t *); -extern int machine_xt_top88_init(const machine_t *); -extern int machine_xt_kaypropc_init(const machine_t *); -extern int machine_xt_sansx16_init(const machine_t *); -extern int machine_xt_bw230_init(const machine_t *); -extern int machine_xt_pb8810_init(const machine_t *); -extern int machine_xt_tuliptc8_init(const machine_t *); - -extern int machine_xt_v20xt_init(const machine_t *); - -extern int machine_xt_iskra3104_init(const machine_t *); -extern int machine_xt_pravetz16_imko4_init(const machine_t *); -extern int machine_xt_pravetz16s_cpu12p_init(const machine_t *); -extern int machine_xt_micoms_xl7turbo_init(const machine_t *); -extern int machine_xt_maz1016_init(const machine_t *); - -/* m_xt_compaq.c */ -extern int machine_xt_compaq_deskpro_init(const machine_t *); -extern int machine_xt_compaq_portable_init(const machine_t *); - -/* m_xt_laserxt.c */ -extern int machine_xt_laserxt_init(const machine_t *); +/* 8088 */ #ifdef EMU_DEVICE_H -extern const device_t laserxt_device; +extern const device_t ibmpc_device; #endif -extern int machine_xt_lxt3_init(const machine_t *); +extern int machine_ibmpc_init(const machine_t *); #ifdef EMU_DEVICE_H -extern const device_t lxt3_device; +extern const device_t ibmpc82_device; #endif +extern int machine_ibmpc82_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t ibmxt_device; +#endif +extern int machine_ibmxt_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t ibmxt86_device; +#endif +extern int machine_ibmxt86_init(const machine_t *); +extern int machine_xt_americxt_init(const machine_t *); +extern int machine_xt_amixt_init(const machine_t *); +extern int machine_xt_ataripc3_init(const machine_t *); +extern int machine_xt_bw230_init(const machine_t *); +extern int machine_xt_mpc1600_init(const machine_t *); +extern int machine_xt_compaq_portable_init(const machine_t *); +extern int machine_xt_dtk_init(const machine_t *); +extern int machine_xt_pcspirit_init(const machine_t *); +extern int machine_genxt_init(const machine_t *); +extern int machine_xt_glabios_init(const machine_t *); +extern int machine_xt_top88_init(const machine_t *); +extern int machine_xt_super16t_init(const machine_t *); +extern int machine_xt_super16te_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t jukopc_device; +#endif +extern int machine_xt_jukopc_init(const machine_t *); +extern int machine_xt_kaypropc_init(const machine_t *); +extern int machine_xt_micoms_xl7turbo_init(const machine_t *); +extern int machine_xt_pc500_init(const machine_t *); +extern int machine_xt_pc700_init(const machine_t *); +extern int machine_xt_pc4i_init(const machine_t *); +extern int machine_xt_openxt_init(const machine_t *); +extern int machine_xt_p3105_init(const machine_t *); +extern int machine_xt_pxxt_init(const machine_t *); +extern int machine_xt_pravetz16_imko4_init(const machine_t *); +extern int machine_xt_pravetz16s_cpu12p_init(const machine_t *); +extern int machine_xt_pb8810_init(const machine_t *); +extern int machine_xt_sansx16_init(const machine_t *); +extern int machine_xt_pcxt_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vendex_device; +#endif +extern int machine_xt_vendex_init(const machine_t *); +extern int machine_xt_laserxt_init(const machine_t *); +extern int machine_xt_znic_init(const machine_t *); +extern int machine_xt_z151_init(const machine_t *); +extern int machine_xt_z159_init(const machine_t *); +extern int machine_xt_z184_init(const machine_t *); + +/* GC100A */ +extern int machine_xt_p3120_init(const machine_t *); + +/* V20 */ +extern int machine_xt_v20xt_init(const machine_t *); +extern int machine_xt_tuliptc8_init(const machine_t *); + +/* 8086 */ +extern int machine_xt_pc5086_init(const machine_t *); +extern int machine_xt_maz1016_init(const machine_t *); +extern int machine_xt_iskra3104_init(const machine_t *); +extern int machine_xt_lxt3_init(const machine_t *); +extern int machine_xt_compaq_deskpro_init(const machine_t *); -/* m_xt_philips.c */ -extern int machine_xt_p3105_init(const machine_t *); -extern int machine_xt_p3120_init(const machine_t *); /* m_xt_t1000.c */ -extern int machine_xt_t1000_init(const machine_t *); -extern int machine_xt_t1200_init(const machine_t *); - -/* m_xt_zenith.c */ -extern int machine_xt_z184_init(const machine_t *); -extern int machine_xt_z151_init(const machine_t *); -extern int machine_xt_z159_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t t1000_video_device; +extern const device_t t1200_video_device; +#endif +extern int machine_xt_t1000_init(const machine_t *); +extern int machine_xt_t1200_init(const machine_t *); /* m_xt_xi8088.c */ -extern int machine_xt_xi8088_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t xi8088_device; +#endif +extern int machine_xt_xi8088_init(const machine_t *); #endif /*EMU_MACHINE_H*/ diff --git a/src/include/86box/sio.h b/src/include/86box/sio.h index b86124273..965aa3461 100644 --- a/src/include/86box/sio.h +++ b/src/include/86box/sio.h @@ -28,6 +28,9 @@ extern const device_t f82c606_device; extern const device_t f82c710_device; extern const device_t f82c710_pc5086_device; +/* Commodore */ +extern const device_t cbm_io_device; + /* SM(S)C */ #define FDC37C651 0x00051 #define FDC37C661 0x00061 diff --git a/src/machine/CMakeLists.txt b/src/machine/CMakeLists.txt index ae9d2a1a9..96c8a1950 100644 --- a/src/machine/CMakeLists.txt +++ b/src/machine/CMakeLists.txt @@ -19,33 +19,31 @@ add_library(mch OBJECT machine.c machine_table.c m_xt.c - m_xt_compaq.c - m_xt_laserxt.c - m_xt_philips.c m_xt_t1000.c m_xt_xi8088.c - m_xt_zenith.c m_pcjr.c m_amstrad.c - m_amstrad_pc5x86.c m_europc.c m_elt.c m_xt_olivetti.c m_tandy.c m_v86p.c - m_at.c - m_at_commodore.c - m_at_grid.c m_at_t3100e.c m_ps1.c - m_ps1_hdc.c m_ps2_isa.c m_ps2_mca.c - m_at_compaq.c + m_at_common.c m_at_286.c m_at_386sx.c m_at_m6117.c + m_at_386dx.c + m_at_486slc.c m_at_386dx_486.c + m_at_socket1.c + m_at_socket2.c + m_at_socket3.c + m_at_socket3_pci.c + m_at_486_misc.c m_at_socket4.c m_at_socket5.c m_at_socket7_3v.c @@ -53,6 +51,8 @@ add_library(mch OBJECT m_at_sockets7.c m_at_socket8.c m_at_slot1.c + m_at_slot1_2.c + m_at_slot1_socket370.c m_at_slot2.c m_at_socket370.c m_at_misc.c diff --git a/src/machine/m_amstrad_pc5x86.c b/src/machine/m_amstrad_pc5x86.c deleted file mode 100644 index eafa06c1e..000000000 --- a/src/machine/m_amstrad_pc5x86.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. - * - * Amstrad PC5086 and PC5286 emulation. - * - * Authors: Miran Grca, - * - * Copyright 2025 Miran Grca. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the: - * - * Free Software Foundation, Inc. - * 59 Temple Place - Suite 330 - * Boston, MA 02111-1307 - * USA. - */ -#include -#include -#include <86box/86box.h> -#include "cpu.h" -#include <86box/device.h> -#include <86box/mem.h> -#include <86box/rom.h> -#include <86box/timer.h> -#include <86box/chipset.h> -#include <86box/machine.h> -#include <86box/nvr.h> -#include <86box/keyboard.h> -#include <86box/sio.h> - -int -machine_pc5086_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pc5086/sys_rom.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_common_init(model); - - device_add(&ct_82c100_device); - device_add(&f82c710_pc5086_device); - - device_add(&kbc_xt_device); - - device_add(&amstrad_megapc_nvr_device); /* NVR that is initialized to all 0x00's. */ - - return ret; -} diff --git a/src/machine/m_at.c b/src/machine/m_at.c deleted file mode 100644 index 09cd9d5cd..000000000 --- a/src/machine/m_at.c +++ /dev/null @@ -1,410 +0,0 @@ -/* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. - * - * Standard PC/AT implementation. - * - * - * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, - * Jasmine Iwanek, - * - * Copyright 2017-2020 Fred N. van Kempen. - * Copyright 2016-2020 Miran Grca. - * Copyright 2008-2020 Sarah Walker. - * Copyright 2025 Jasmine Iwanek. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the: - * - * Free Software Foundation, Inc. - * 59 Temple Place - Suite 330 - * Boston, MA 02111-1307 - * USA. - */ -#include -#include -#include -#include -#include <86box/86box.h> -#include <86box/timer.h> -#include <86box/pic.h> -#include <86box/pit.h> -#include <86box/dma.h> -#include <86box/mem.h> -#include <86box/device.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/fdc_ext.h> -#include <86box/nvr.h> -#include <86box/gameport.h> -#include <86box/ibm_5161.h> -#include <86box/keyboard.h> -#include <86box/lpt.h> -#include <86box/rom.h> -#include <86box/hdc.h> -#include <86box/port_6x.h> -#include <86box/machine.h> - -void -machine_at_common_init_ex(const machine_t *model, int type) -{ - machine_common_init(model); - - refresh_at_enable = 1; - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_at); - pic2_init(); - dma16_init(); - - if (!(type & 4)) - device_add(&port_6x_device); - type &= 3; - - if (type == 1) - device_add(&ibmat_nvr_device); - else if (type == 0) - device_add(&at_nvr_device); - - standalone_gameport_type = &gameport_device; -} - -void -machine_at_common_init(const machine_t *model) -{ - machine_at_common_init_ex(model, 0); -} - -void -machine_at_init(const machine_t *model) -{ - machine_at_common_init(model); - - device_add(&kbc_at_device); -} - -static void -machine_at_ibm_common_init(const machine_t *model) -{ - machine_at_common_init_ex(model, 1); - - device_add(&kbc_at_device); - - mem_remap_top(384); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); -} - -void -machine_at_ps2_init(const machine_t *model) -{ - machine_at_common_init(model); - - device_add(&kbc_ps2_device); -} - -void -machine_at_common_ide_init(const machine_t *model) -{ - machine_at_common_init(model); - - device_add(&ide_isa_device); -} - -void -machine_at_ibm_common_ide_init(const machine_t *model) -{ - machine_at_common_init_ex(model, 1); - - device_add(&ide_isa_device); -} - -void -machine_at_ide_init(const machine_t *model) -{ - machine_at_init(model); - - device_add(&ide_isa_device); -} - -void -machine_at_ps2_ide_init(const machine_t *model) -{ - machine_at_ps2_init(model); - - device_add(&ide_isa_device); -} - -static const device_config_t ibmat_config[] = { - // clang-format off - { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, - .default_string = "ibm5170_111585", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { - .name = "62X082x (11/15/85)", - .internal_name = "ibm5170_111585", - .bios_type = BIOS_NORMAL, - .files_no = 2, - .local = 0, - .size = 65536, - .files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47.BIN", "" } - }, - { - .name = "61X9266 (11/15/85) (Alt)", - .internal_name = "ibm5170_111585_alt", - .bios_type = BIOS_NORMAL, - .files_no = 2, - .local = 0, - .size = 65536, - .files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27_61X9266.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47_61X9265.BIN", "" } - }, - { - .name = "648009x (06/10/85)", - .internal_name = "ibm5170_061085", - .bios_type = BIOS_NORMAL, - .files_no = 2, - .local = 0, - .size = 65536, - .files = { "roms/machines/ibmat/BIOS_5170_10JUN85_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JUN85_U47.BIN", "" } - }, - { - .name = "618102x (01/10/84)", - .internal_name = "ibm5170_011084", - .bios_type = BIOS_NORMAL, - .files_no = 2, - .local = 0, - .size = 65536, - .files = { "roms/machines/ibmat/BIOS_5170_10JAN84_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JAN84_U47.BIN", "" } - }, - // The following are Diagnostic ROMs. - { - .name = "Supersoft Diagnostics", - .internal_name = "diag_supersoft", - .bios_type = BIOS_NORMAL, - .files_no = 2, - .local = 2, - .size = 65536, - .files = { "roms/machines/diagnostic/5170_EVEN_LOW_U27_27256.bin", "roms/machines/diagnostic/5170_ODD_HIGH_U47_27256.bin", "" } - }, - - { .files_no = 0 } - }, - }, - { - .name = "enable_5161", - .description = "IBM 5161 Expansion Unit", - .type = CONFIG_BINARY, - .default_int = 0 - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t ibmat_device = { - .name = "IBM AT", - .internal_name = "ibmat_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = ibmat_config -}; - -int -machine_at_ibm_init(const machine_t *model) -{ - int ret = 0; - uint8_t enable_5161; - const char *fn[2]; - - /* No ROMs available. */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - enable_5161 = machine_get_config_int("enable_5161"); - fn[0] = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); - fn[1] = device_get_bios_file(model->device, device_get_config_bios("bios"), 1); - ret = bios_load_interleaved(fn[0], fn[1], 0x000f0000, 65536, 0); - device_context_restore(); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - if (enable_5161) - device_add(&ibm_5161_device); - - return ret; -} - -/* IBM AT machines with custom BIOSes */ -int -machine_at_ibmatquadtel_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/ibmatquadtel/BIOS_30MAR90_U27_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", - "roms/machines/ibmatquadtel/BIOS_30MAR90_U47_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - return ret; -} - -int -machine_at_ibmatami_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN", - "roms/machines/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - return ret; -} - -int -machine_at_ibmatpx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Even.bin", - "roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Odd.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - return ret; -} - -static const device_config_t ibmxt286_config[] = { - // clang-format off - { - .name = "enable_5161", - .description = "IBM 5161 Expansion Unit", - .type = CONFIG_BINARY, - .default_int = 0 - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t ibmxt286_device = { - .name = "IBM XT Model 286", - .internal_name = "ibmxt286_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = ibmxt286_config -}; - -int -machine_at_ibmxt286_init(const machine_t *model) -{ - int ret; - uint8_t enable_5161; - - device_context(model->device); - enable_5161 = machine_get_config_int("enable_5161"); - device_context_restore(); - - ret = bios_load_interleaved("roms/machines/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin", - "roms/machines/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - if (enable_5161) - device_add(&ibm_5161_device); - - return ret; -} - -int -machine_at_pb286_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/pb286/LB_V332P.BIN", - "roms/machines/pb286/HB_V332P.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - return ret; -} - -int -machine_at_siemens_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/siemens/286BIOS.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 1); - - device_add(&kbc_at_siemens_device); - - mem_remap_top(384); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - diff --git a/src/machine/m_at_286.c b/src/machine/m_at_286.c index e13b81853..0ecc06a42 100644 --- a/src/machine/m_at_286.c +++ b/src/machine/m_at_286.c @@ -33,6 +33,7 @@ #include <86box/fdc.h> #include <86box/fdc_ext.h> #include <86box/hdc.h> +#include <86box/ibm_5161.h> #include <86box/nvr.h> #include <86box/port_6x.h> #define USE_SIO_DETECT @@ -40,10 +41,310 @@ #include <86box/serial.h> #include <86box/video.h> #include <86box/vid_cga.h> +#include <86box/vid_cga_comp.h> #include <86box/flash.h> #include <86box/machine.h> /* ISA */ +static const device_config_t ibmat_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "ibm5170_111585", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { + .name = "62X082x (11/15/85)", + .internal_name = "ibm5170_111585", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 65536, + .files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47.BIN", "" } + }, + { + .name = "61X9266 (11/15/85) (Alt)", + .internal_name = "ibm5170_111585_alt", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 65536, + .files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27_61X9266.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47_61X9265.BIN", "" } + }, + { + .name = "648009x (06/10/85)", + .internal_name = "ibm5170_061085", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 65536, + .files = { "roms/machines/ibmat/BIOS_5170_10JUN85_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JUN85_U47.BIN", "" } + }, + { + .name = "618102x (01/10/84)", + .internal_name = "ibm5170_011084", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 65536, + .files = { "roms/machines/ibmat/BIOS_5170_10JAN84_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JAN84_U47.BIN", "" } + }, + // The following are Diagnostic ROMs. + { + .name = "Supersoft Diagnostics", + .internal_name = "diag_supersoft", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 2, + .size = 65536, + .files = { "roms/machines/diagnostic/5170_EVEN_LOW_U27_27256.bin", "roms/machines/diagnostic/5170_ODD_HIGH_U47_27256.bin", "" } + }, + + { .files_no = 0 } + }, + }, + { + .name = "enable_5161", + .description = "IBM 5161 Expansion Unit", + .type = CONFIG_BINARY, + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t ibmat_device = { + .name = "IBM AT", + .internal_name = "ibmat_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ibmat_config +}; + +static void +machine_at_ibm_common_init(const machine_t *model) +{ + machine_at_common_init_ex(model, 1); + + device_add(&kbc_at_device); + + mem_remap_top(384); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); +} + +int +machine_at_ibmat_init(const machine_t *model) +{ + int ret = 0; + uint8_t enable_5161; + const char *fn[2]; + + /* No ROMs available. */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + enable_5161 = machine_get_config_int("enable_5161"); + fn[0] = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); + fn[1] = device_get_bios_file(model->device, device_get_config_bios("bios"), 1); + ret = bios_load_interleaved(fn[0], fn[1], 0x000f0000, 65536, 0); + device_context_restore(); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + if (enable_5161) + device_add(&ibm_5161_device); + + return ret; +} + +static const device_config_t ibmxt286_config[] = { + // clang-format off + { + .name = "enable_5161", + .description = "IBM 5161 Expansion Unit", + .type = CONFIG_BINARY, + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t ibmxt286_device = { + .name = "IBM XT Model 286", + .internal_name = "ibmxt286_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ibmxt286_config +}; + +int +machine_at_ibmxt286_init(const machine_t *model) +{ + int ret; + uint8_t enable_5161; + + device_context(model->device); + enable_5161 = machine_get_config_int("enable_5161"); + device_context_restore(); + + ret = bios_load_interleaved("roms/machines/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin", + "roms/machines/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + if (enable_5161) + device_add(&ibm_5161_device); + + return ret; +} + +int +machine_at_ibmatami_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN", + "roms/machines/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + return ret; +} + +int +machine_at_cmdpc_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/cmdpc30/commodore pc 30 iii even.bin", + "roms/machines/cmdpc30/commodore pc 30 iii odd.bin", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + machine_at_init(model); + + mem_remap_top(384); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&cbm_io_device); + + return ret; +} + +int +machine_at_portableii_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleavedr("roms/machines/portableii/109740-001.rom", + "roms/machines/portableii/109739-001.rom", + 0x000f8000, 65536, 0); + + if (bios_only || !ret) + return ret; + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + video_reset(gfxcard[0]); + + device_add(&compaq_device); + + machine_at_common_init(model); + device_add(&kbc_at_compaq_device); + + return ret; +} + +int +machine_at_portableiii_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linearr("roms/machines/portableiii/K Combined.bin", + 0x000f8000, 65536, 0); + + + if (bios_only || !ret) + return ret; + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + video_reset(gfxcard[0]); + + if (hdc_current[0] == HDC_INTERNAL) + device_add(&ide_isa_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&compaq_plasma_device); + + device_add(&compaq_device); + + machine_at_common_init(model); + device_add(&kbc_at_compaq_device); + + return ret; +} + +int +machine_at_grid1520_init(const machine_t *model) { + int ret = 0; + + ret = bios_load_linear("roms/machines/grid1520/grid1520_891025.rom", + 0x000f8000, 0x8000, 0); + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + mem_remap_top(384); + + device_add(&kbc_at_device); + // for now just select CGA with amber monitor + //device_add(&cga_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&grid1520_device); + + return ret; +} + int machine_at_mr286_init(const machine_t *model) { @@ -115,6 +416,80 @@ machine_at_m290_init(const machine_t *model) return ret; } +int +machine_at_ibmatpx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Even.bin", + "roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Odd.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + return ret; +} + +int +machine_at_ibmatquadtel_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/ibmatquadtel/BIOS_30MAR90_U27_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", + "roms/machines/ibmatquadtel/BIOS_30MAR90_U47_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + return ret; +} + +int +machine_at_pb286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/pb286/LB_V332P.BIN", + "roms/machines/pb286/HB_V332P.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + return ret; +} + +int +machine_at_siemens_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/siemens/286BIOS.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 1); + + device_add(&kbc_at_siemens_device); + + mem_remap_top(384); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + /* C&T PC/AT */ static void machine_at_ctat_common_init(const machine_t *model) diff --git a/src/machine/m_at_386dx.c b/src/machine/m_at_386dx.c new file mode 100644 index 000000000..0d7d8d507 --- /dev/null +++ b/src/machine/m_at_386dx.c @@ -0,0 +1,372 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of 386DX machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/vid_cga.h> +#include <86box/vid_cga_comp.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* ISA */ +static void +machine_at_deskpro386_common_init(const machine_t *model) +{ + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + video_reset(gfxcard[0]); + + device_add(&compaq_386_device); + + machine_at_common_init(model); + device_add(&kbc_at_compaq_device); +} + +int +machine_at_deskpro386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linearr("roms/machines/deskpro386/1986-09-04-HI.json.bin", + 0x000f8000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_deskpro386_common_init(model); + + return ret; +} + +int +machine_at_deskpro386_05_1988_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linearr("roms/machines/deskpro386/1988-05-10.json.bin", + 0x000f8000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_deskpro386_common_init(model); + + return ret; +} + +int +machine_at_portableiii386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linearr("roms/machines/portableiii/P.2 Combined.bin", + 0x000f0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + video_reset(gfxcard[0]); + + if (hdc_current[0] == HDC_INTERNAL) + device_add(&ide_isa_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&compaq_plasma_device); + + device_add(&compaq_386_device); + + machine_at_common_init(model); + device_add(&kbc_at_compaq_device); + + return ret; +} + +int +machine_at_micronics386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/micronics386/386-Micronics-09-00021-EVEN.BIN", + "roms/machines/micronics386/386-Micronics-09-00021-ODD.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_init(model); + device_add(&port_92_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_micronics386px_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/micronics386/386-Micronics-09-00021-LO.BIN", + "roms/machines/micronics386/386-Micronics-09-00021-HI.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_init(model); + device_add(&port_92_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* ACC 2168 */ +int +machine_at_acc386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/acc386/acc386.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&acc2168_device); + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* C&T 386/AT */ +int +machine_at_ecs386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - L chip.bin", + "roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - H chip.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&cs8230_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&kbc_at_ami_device); + + return ret; +} + +int +machine_at_spc6000a_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/spc6000a/3c80.u27", + "roms/machines/spc6000a/9f80.u26", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 1); + device_add(&cs8230_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&kbc_at_ami_device); + + return ret; +} + +int +machine_at_tandy4000_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tandy4000/BIOS Tandy 4000 v1.03.01.bin", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&cs8230_device); + device_add(&kbc_at_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* ALi M1429 */ +int +machine_at_ecs386v_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ecs386v/PANDA_386V.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&ali1429_device); + device_add(&kbc_ps2_intel_ami_pci_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* OPTi 391 */ +int +machine_at_dataexpert386wb_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/dataexpert386wb/st0386-wb-ver2-0-618f078c738cb397184464.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti391_device); + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* OPTi 495SLC */ +int +machine_at_opti495_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/award495/opt495s.awa", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti495slc_device); + + device_add(&kbc_at_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* SiS 310 */ +int +machine_at_asus3863364k_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/asus3863364k/am27c512dip28-64b53c26be3d8160533563.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&rabbit_device); + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_asus386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/asus386/ASUS_ISA-386C_BIOS.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&rabbit_device); + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 812e93c79..b20fc3502 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -6,13 +6,11 @@ * * This file is part of the 86Box distribution. * - * Implementation of 386DX and 486 machines. - * - * + * Implementation of 386DX/486 machines. * * Authors: Miran Grca, * - * Copyright 2016-2020 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -50,274 +48,35 @@ #include <86box/plat_unused.h> #include <86box/sound.h> -/* 386DX */ +/* ALi M1429G */ int -machine_at_acc386_init(const machine_t *model) +machine_at_exp4349_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/acc386/acc386.BIN", + ret = bios_load_linear("roms/machines/exp4349/biosdump.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) return ret; machine_at_common_init(model); - device_add(&acc2168_device); + + device_add(&ali1429g_device); device_add(&kbc_at_ami_device); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); - return ret; } +/* OPTi 495SX */ int -machine_at_asus3863364k_init(const machine_t *model) +machine_at_c747_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/asus3863364k/am27c512dip28-64b53c26be3d8160533563.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&rabbit_device); - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_asus386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/asus386/ASUS_ISA-386C_BIOS.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&rabbit_device); - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_tandy4000_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tandy4000/BIOS Tandy 4000 v1.03.01.bin", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&cs8230_device); - device_add(&kbc_at_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_dtk461_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/dtk461/DTK.BIO", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&sl82c461_device); - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -static void -machine_at_sis401_common_init(const machine_t *model) -{ - machine_at_common_init(model); - device_add(&sis_85c401_device); - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); -} - -int -machine_at_sis401_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/sis401/SIS401-2.AMI", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis401_common_init(model); - - return ret; -} - -int -machine_at_isa486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/isa486/ISA-486.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis401_common_init(model); - - return ret; -} - -int -machine_at_av4_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/av4/amibios_486dx_isa_bios_aa4025963.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&sis_85c460_device); - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_valuepoint433_init(const machine_t *model) // hangs without the PS/2 mouse -{ - int ret; - - ret = bios_load_linear("roms/machines/valuepoint433/$IMAGEP.FLH", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_ide_init(model); - device_add(&sis_85c461_device); - if (gfxcard[0] == VID_INTERNAL) - device_add(&et4000w32_onboard_device); - - device_add_params(&fdc37c6xx_device, (void *) (FDC37C661 | FDC37C6XX_IDE_PRI)); - device_add(&kbc_ps2_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_ecs386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - L chip.bin", - "roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - H chip.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&cs8230_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&kbc_at_ami_device); - - return ret; -} - -int -machine_at_spc6000a_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/spc6000a/3c80.u27", - "roms/machines/spc6000a/9f80.u26", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 1); - device_add(&cs8230_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&kbc_at_ami_device); - - return ret; -} - -int -machine_at_ecs386v_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ecs386v/PANDA_386V.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&ali1429_device); - device_add(&kbc_ps2_intel_ami_pci_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_rycleopardlx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/rycleopardlx/486-RYC-Leopard-LX.BIN", + ret = bios_load_linear("roms/machines/c747/486-C747 Tandon.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -325,371 +84,15 @@ machine_at_rycleopardlx_init(const machine_t *model) machine_at_common_init(model); - device_add(&opti283_device); - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_486vchd_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486vchd/486-4386-VC-HD.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&via_vt82c49x_device); - device_add(&kbc_at_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_cs4031_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/cs4031/CHIPS_1.AMI", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&cs4031_device); - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_pb410a_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pb410a/pb410a.080337.4abf.u25.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_ide_init(model); - - device_add(&kbc_ps2_device); - - device_add(&acc3221_device); - device_add(&acc2168_device); - - device_add(&phoenix_486_jumper_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - return ret; -} - -int -machine_at_vect486vl_init(const machine_t *model) // has HDC problems -{ - int ret; - - ret = bios_load_linear("roms/machines/vect486vl/aa0500.ami", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - machine_at_common_init_ex(model, 2); - - device_add(&vl82c480_device); - - device_add(&vl82c113_device); - - device_add(&ide_isa_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); - - return ret; -} - -int -machine_at_d824_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/d824/fts-biosupdated824noflashbiosepromv320-320334-160.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - machine_at_common_init_ex(model, 2); - - device_add(&vl82c480_device); + /* The EFAR chipset is a rebrand of the OPTi 495SX. */ + device_add(&opti495sx_device); /* - Technically, it should be the VL82C114 but we do not have - a proper datasheet of it that tells us the registers. + No idea what KBC it actually has but this produces the + desired behavior: command A9 does absolutely nothing. */ - device_add(&vl82c113_device); - - device_add(&ide_isa_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C651); - - return ret; -} - -int -machine_at_tuliptc38_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tuliptc38/TULIP1.BIN", - 0x000f0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - device_add(&vl82c486_device); - device_add(&tulip_jumper_device); - - device_add(&vl82c113_device); - - device_add(&ide_isa_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); - - if (gfxcard[0] == VID_INTERNAL) { - bios_load_aux_linear("roms/machines/tuliptc38/VBIOS.BIN", - 0x000c0000, 32768, 0); - - device_add(machine_get_vid_device(machine)); - } else for (uint16_t i = 0; i < 32768; i++) - rom[i] = mem_readb_phys(0x000c0000 + i); - - mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); - mem_mapping_set_exec(&bios_mapping, rom); - - return ret; -} - -int -machine_at_martin_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/martin/NONSCSI.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - device_add(&vl82c480_device); - device_add(&vl82c113_device); - - device_add(&ide_vlb_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); - - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_acera1g_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/acera1g/4alo001.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&ali1429g_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(&gd5428_onboard_device); - - device_add(&kbc_ps2_acer_pci_device); - - device_add_params(&pc87310_device, (void *) (PC87310_ALI)); - device_add(&ide_ali5213_device); - - return ret; -} - -int -machine_at_acerv10_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/acerv10/ALL.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&sis_85c461_device); - device_add(&kbc_ps2_acer_pci_device); - device_add(&ide_isa_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_decpclpv_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/decpclpv/bios.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&sis_85c461_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&kbc_ps2_phoenix_pci_device); - - device_add(&ide_isa_2ch_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C663 | FDC37C6XX_IDE_PRI)); - - return ret; -} - -int -machine_at_dell466np_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/dell466np/466np.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&sis_85c461_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - else { - for (uint16_t i = 0; i < 32768; i++) - rom[i] = mem_readb_phys(0x000c0000 + i); - } - mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); - mem_mapping_set_exec(&bios_mapping, rom); - - device_add(&kbc_ps2_phoenix_pci_device); - - device_add(&ide_isa_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C661 | FDC37C6XX_IDE_PRI)); - - return ret; -} - -static void -machine_at_ali1429_common_init(const machine_t *model, int is_green) -{ - machine_at_common_init(model); - - if (is_green) - device_add(&ali1429g_device); - else - device_add(&ali1429_device); - - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); -} - -int -machine_at_ali1429_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ali1429/ami486.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ali1429_common_init(model, 0); - - return ret; -} - -int -machine_at_winbios1429_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/win486/ali1429g.amw", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ali1429_common_init(model, 1); - - return ret; -} - -int -machine_at_opti495_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/award495/opt495s.awa", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&opti495slc_device); - - device_add(&kbc_at_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); + device_add(&kbc_at_siemens_device); + device_add_params(&um866x_device, (void *) (UM82C862F | UM866X_IDE_PRI)); return ret; } @@ -738,2224 +141,3 @@ machine_at_opti495_mr_init(const machine_t *model) return ret; } - -int -machine_at_c747_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/c747/486-C747 Tandon.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - /* The EFAR chipset is a rebrand of the OPTi 495SX. */ - device_add(&opti495sx_device); - - /* - No idea what KBC it actually has but this produces the - desired behavior: command A9 does absolutely nothing. - */ - device_add(&kbc_at_siemens_device); - device_add_params(&um866x_device, (void *) (UM82C862F | UM866X_IDE_PRI)); - - return ret; -} - -int -machine_at_exp4349_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/exp4349/biosdump.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&ali1429g_device); - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - return ret; -} - -static void -machine_at_403tg_common_init(const machine_t *model, int nvr_hack) -{ - if (nvr_hack) { - machine_at_common_init_ex(model, 2); - device_add(&ami_1994_nvr_device); - } else - machine_at_common_init(model); - - device_add(&opti895_device); - - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); -} - -int -machine_at_403tg_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/403tg/403TG.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_403tg_common_init(model, 0); - - return ret; -} - -int -machine_at_403tg_d_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/403tg_d/J403TGRevD.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_403tg_common_init(model, 1); - - return ret; -} - -int -machine_at_403tg_d_mr_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/403tg_d/MRBiosOPT895.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_403tg_common_init(model, 0); - - return ret; -} - -static const device_config_t pb450_config[] = { - // clang-format off - { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, - .default_string = "pb450a", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "PhoenixBIOS 4.03 - Revision PCI 1.0A", .internal_name = "pb450a_pci10a" /*"pci10a"*/, .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/OPTI802.bin", "" } }, - { .name = "PhoenixBIOS 4.03 - Revision PNP 1.1A", .internal_name = "pb450a", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/PNP11A.bin", "" } }, - { .name = "PhoenixBIOS 4.05 - Revision P4HS20 (by Micro Firmware)", .internal_name = "pb450a_p4hs20", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/p4hs20.bin", "" } }, - { .files_no = 0 } - }, - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t pb450_device = { - .name = "Packard Bell PB450", - .internal_name = "pb450_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = pb450_config -}; - -int -machine_at_pb450_init(const machine_t *model) -{ - int ret = 0; - const char* fn; - - /* No ROMs available */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - device_add(&ide_vlb_2ch_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 5, 6, 7, 8); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&opti895_device); - device_add(&opti602_device); - device_add(&opti822_device); - device_add(&kbc_ps2_phoenix_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); - device_add(&ide_opti611_vlb_device); - device_add(&intel_flash_bxt_device); - device_add(&phoenix_486_jumper_pci_device); - - return ret; -} - -static void -machine_at_pc330_6573_common_init(const machine_t *model) -{ - machine_at_common_init_ex(model, 2); - device_add(&ide_vlb_2ch_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 5, 6, 7, 8); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 9, 10, 11, 12); - /* This is a guess because the BIOS always gives it a video BIOS - and never gives it an IRQ, so it is impossible to known for - certain until we obtain PCI readouts from the real machine. */ - pci_register_slot(0x0E, PCI_CARD_VIDEO, 13, 14, 15, 16); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&opti602_device); - device_add(&opti802g_device); - device_add(&opti822_device); - device_add(&kbc_ps2_ami_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); - device_add(&ide_opti611_vlb_device); - device_add(&intel_flash_bxt_device); -} - -int -machine_at_aptiva510_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/aptiva510/$IMAGES.USF", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_pc330_6573_common_init(model); - - return ret; -} - -int -machine_at_pc330_6573_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pc330_6573/$IMAGES.USF", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_pc330_6573_common_init(model); - - return ret; -} - -int -machine_at_mvi486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/mvi486/MVI627.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&opti498_device); - - device_add(&kbc_at_device); - - device_add(&ide_isa_device); - device_add_params(&pc873xx_device, (void *) (PCX73XX_IDE_PRI | PCX730X_398)); - - return ret; -} - -static void -machine_at_sis_85c471_common_init(const machine_t *model) -{ - machine_at_common_init(model); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&sis_85c471_device); -} - -int -machine_at_ami471_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ami471/SIS471BE.AMI", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis_85c471_common_init(model); - device_add(&kbc_at_ami_device); - - return ret; -} - -int -machine_at_advantage40xxd_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/advantage40xxd/AST101.09A", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&sis_85c471_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&kbc_ps2_phoenix_device); - device_add_params(&um866x_device, (void *) (UM82C863F | UM866X_IDE_PRI)); - - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_vli486sv2g_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/vli486sv2g/0402.001", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis_85c471_common_init(model); - device_add(&kbc_ps2_ami_device); - - return ret; -} - -int -machine_at_dtk486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/dtk486/4siw005.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis_85c471_common_init(model); - device_add(&kbc_at_device); - - return ret; -} - -int -machine_at_px471_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/px471/SIS471A1.PHO", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis_85c471_common_init(model); - device_add(&ide_vlb_device); - device_add(&kbc_at_device); - - return ret; -} - -int -machine_at_win471_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/win471/486-SiS_AC0360136.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis_85c471_common_init(model); - device_add(&kbc_at_ami_device); - - return ret; -} - -int -machine_at_pci400ca_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pci400ca/486-AA008851.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SCSI, 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(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&kbc_at_ami_device); - device_add(&sio_device); - device_add(&intel_flash_bxt_ami_device); - - device_add(&i420tx_device); - device_add(&ncr53c810_onboard_pci_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_vi15g_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/vi15g/vi15gr23.rom", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis_85c471_common_init(model); - device_add(&kbc_at_ami_device); - - return ret; -} - -int -machine_at_greenb_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/greenb/4gpv31-ami-1993-8273517.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&contaq_82c597_device); - - device_add(&kbc_at_ami_device); - - return ret; -} - -int -machine_at_4gpv5_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/4gpv5/4GPV5.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&contaq_82c596a_device); - - device_add(&kbc_at_device); - - return ret; -} - -static void -machine_at_sis_85c496_common_init(UNUSED(const machine_t *model)) -{ - device_add(&ide_pci_2ch_device); - - pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); - pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - - pci_set_irq_routing(PCI_INTA, PCI_IRQ_DISABLED); - pci_set_irq_routing(PCI_INTB, PCI_IRQ_DISABLED); - pci_set_irq_routing(PCI_INTC, PCI_IRQ_DISABLED); - pci_set_irq_routing(PCI_INTD, PCI_IRQ_DISABLED); -} - -int -machine_at_r418_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/r418/r418i.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_device); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&kbc_ps2_pci_device); - - return ret; -} - -int -machine_at_m4li_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/m4li/M4LI.04S", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_device); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&kbc_ps2_pci_device); - - return ret; -} - -int -machine_at_ls486e_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ls486e/LS486E RevC.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_ls486e_device); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&kbc_ps2_ami_pci_device); - - return ret; -} - -int -machine_at_4dps_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/4dps/4DPS172G.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_device); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add_params(&w837x7_device, (void *) (W83787IF | W837X7_KEY_89)); - device_add(&kbc_ps2_ami_device); - - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_ms4144_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ms4144/ms-4144-1.4.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_ls486e_device); - pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); - device_add(&kbc_at_ami_device); - - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_acerp3_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/acerp3/Acer Mate 600 P3 BIOS U13 V2.0R02-J3 ACR8DE00-S00-950911-R02-J3.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_device); - pci_register_slot(0x09, PCI_CARD_VIDEO, 0, 0, 0, 0); - pci_register_slot(0x0A, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); - - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); - device_add(&kbc_ps2_acer_pci_device); - device_add(&ide_cmd640_pci_legacy_only_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(&gd5434_onboard_pci_device); - - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_486sp3c_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486sp3c/SI4I0306.AWD", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_device); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&kbc_ps2_ami_pci_device); - - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_4saw2_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/4saw2/4saw0911.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_device); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add_params(&w837x7_device, (void *) (W83777F | W837X7_KEY_89)); - device_add(&kbc_ps2_pci_device); - - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_alfredo_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/alfredo/1010AQ0_.BIO", - "roms/machines/alfredo/1010AQ0_.BI1", 0x1c000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - device_add(&amstrad_megapc_nvr_device); - device_add(&ide_pci_device); - - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&kbc_ps2_phoenix_device); - device_add(&sio_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C663); - device_add(&intel_flash_bxt_ami_device); - - device_add(&i420tx_device); - - return ret; -} - -int -machine_at_ninja_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/ninja/1008AY0_.BIO", - "roms/machines/ninja/1008AY0_.BI1", 0x1c000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - device_add(&amstrad_megapc_nvr_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 2, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 1, 2, 1); - device_add(&kbc_ps2_phoenix_device); - device_add(&intel_flash_bxt_ami_device); - - device_add(&i420ex_device); - device_add_params(&i82091aa_device, (void *) I82091AA_022); - - return ret; -} - -int -machine_at_bat4ip3e_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/bat4ip3e/404C.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_IDE, 0xfe, 0xff, 0, 0); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 1, 2); - pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 1, 2, 1); - pci_register_slot(0x0a, PCI_CARD_NORMAL, 1, 2, 1, 2); - - device_add(&phoenix_486_jumper_pci_device); - device_add(&kbc_ps2_pci_device); - device_add(&i420ex_device); - device_add(&ide_cmd640_pci_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - - return ret; -} - -int -machine_at_486pi_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486pi/486pi.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 2, 1); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 1, 2); - - device_add(&kbc_ps2_ami_pci_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&i420ex_device); - - return ret; -} - -int -machine_at_sb486p_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/sb486p/amiboot.rom", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 2, 1); - - device_add(&kbc_ps2_ami_pci_device); - device_add_params(&i82091aa_device, (void *) I82091AA_022); - device_add(&i420ex_device); - - return ret; -} - -int -machine_at_486sp3_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486sp3/awsi2737.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&ide_isa_device); - - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4); /* 01 = SCSI */ - pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 03 = Slot 1 */ - pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ - pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */ - pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 06 = Slot 4 */ - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&kbc_at_ami_device); /* Uses the AMIKEY KBC */ - device_add(&sio_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C663 | FDC37C6XX_IDE_PRI)); - device_add(&sst_flash_29ee010_device); - - device_add(&i420tx_device); - device_add(&ncr53c810_onboard_pci_device); - - return ret; -} - -int -machine_at_amis76_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_inverted("roms/machines/s76p/S76P.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - // pci_register_slot(0x01, PCI_CARD_IDE, 1, 2, 3 ,4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&kbc_ps2_ami_pci_device); - device_add(&sio_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&intel_flash_bxt_ami_device); - - device_add(&i420tx_device); - // device_add(&ide_cmd640_pci_device); /* is this actually cmd640? is it single channel? */ - device_add(&ide_pci_device); - - return ret; -} - -int -machine_at_pci400cb_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pci400cb/032295.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - device_add(&ami_1994_nvr_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 3, 2, 1); /* 0F = Slot 1 */ - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 0E = Slot 2 */ - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 0D = Slot 3 */ - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 0C = Slot 4 */ - device_add(&kbc_ps2_ami_pci_device); /* Assume AMI Megakey 1993 standalone ('P') - because of the Tekram machine below. */ - - device_add(&ims8848_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_g486ip_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/g486ip/G486IP.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - device_add(&ami_1992_nvr_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 03 = Slot 1 */ - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 05 = Slot 3 */ - device_add(&kbc_ps2_ami_pci_device); /* AMI Megakey 1993 stanalone ('P') */ - - device_add(&ims8848_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_486sp3g_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486sp3g/PCI-I-486SP3G_0306.001 (Beta).bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&ide_isa_device); - - pci_init(PCI_CONFIG_TYPE_2); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4); /* 01 = SCSI */ - pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 06 = Slot 1 */ - pci_register_slot(0x05, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 05 = Slot 2 */ - pci_register_slot(0x04, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 04 = Slot 3 */ - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&kbc_ps2_ami_pci_device); /* Uses the AMIKEY KBC */ - device_add(&sio_zb_device); - device_add_params(&pc873xx_device, (void *) (PC87332 | PCX73XX_IDE_PRI | PCX730X_398)); - device_add(&sst_flash_29ee010_device); - - device_add(&i420zx_device); - device_add(&ncr53c810_onboard_pci_device); - - return ret; -} - -static const device_config_t sb486pv_config[] = { - // clang-format off - { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, - .default_string = "sb486pv", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "AMI WinBIOS (062594) - Revision 0108", .internal_name = "sb486pv_0108", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/sb486pv/41-0108-062594-SATURN2.rom", "" } }, - { .name = "AMI WinBIOS (062594) - Revision 0301", .internal_name = "sb486pv_0301", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/sb486pv/0301-062594-SATURN2.rom", "" } }, - { .name = "AMIBIOS 6 (071595) - Revision 1301", .internal_name = "sb486pv", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/sb486pv/amiboot.rom", "" } }, - { .files_no = 0 } - }, - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t sb486pv_device = { - .name = "ICS SB486PV", - .internal_name = "sb486pv_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = sb486pv_config -}; - -int -machine_at_sb486pv_init(const machine_t *model) -{ - int ret = 0; - const char* fn; - - /* No ROMs available */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - if (!strcmp(fn, "roms/machines/sb486pv/amiboot.rom")) - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - else - ret = bios_load_linear_inverted(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_2); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0e, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x0f, PCI_CARD_VIDEO, 1, 2, 3, 4); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&kbc_ps2_ami_pci_device); - device_add(&sio_zb_device); - device_add(&ide_rz1000_pci_single_channel_device); - device_add_params(&i82091aa_device, (void *) I82091AA_26E); - if (!strcmp(fn, "roms/machines/sb486pv/amiboot.rom")) - device_add(&intel_flash_bxt_device); - else - device_add(&intel_flash_bxt_ami_device); - - device_add(&i420zx_device); - - return ret; -} - -int -machine_at_486ap4_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486ap4/0205.002", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - /* Excluded: 5, 6, 7, 8 */ - pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 09 = Slot 1 */ - pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 0a = Slot 2 */ - pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 0b = Slot 3 */ - pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 0c = Slot 4 */ - device_add(&kbc_ps2_ami_pci_device); /* Uses the AMIKEY KBC */ - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&i420ex_device); - - return ret; -} - -int -machine_at_g486vpa_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/g486vpa/3.BIN", - 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); - - device_add(&via_vt82c49x_pci_ide_device); - device_add(&via_vt82c505_device); - device_add_params(&pc873xx_device, (void *) (PC87332 | PCX73XX_IDE_SEC | PCX730X_398)); - device_add(&kbc_ps2_ami_pci_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_486vipio2_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486vipio2/1175G701.BIN", - 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); - - device_add(&via_vt82c49x_pci_ide_device); - device_add(&via_vt82c505_device); - device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); - device_add(&kbc_ps2_ami_pci_device); - device_add(&winbond_flash_w29c010_device); - - return ret; -} - -int -machine_at_abpb4_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/abpb4/486-AB-PB4.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CAN_SWITCH_TYPE); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - 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); - - device_add(&ali1489_device); - device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); - device_add(&kbc_at_device); -#if 0 - device_add(&intel_flash_bxt_device); -#endif - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_win486pci_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/win486pci/v1hj3.BIN", - 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(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); - - device_add(&ali1489_device); - device_add_params(&gm82c803ab_device, (void *) GM82C803B); - device_add(&kbc_at_ami_device); - - return ret; -} - -int -machine_at_ms4145_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ms4145/AG56S.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(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(&ali1489_device); - device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); - device_add(&kbc_at_ami_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_sbc490_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/sbc490/07159589.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(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x01, PCI_CARD_VIDEO, 4, 1, 2, 3); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&ali1489_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&kbc_ps2_ami_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_tf486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tf486/tf486v10.BIN", - 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(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - - device_add(&ali1489_device); - device_add(&kbc_at_phoenix_device); - device_add_params(&w83977_device, (void *) (W83977EF | W83977_NO_NVR)); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_arb1476_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/arb1476/w1476b.v21", - 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); - - device_add(&ali1489_device); - device_add_params(&fdc37c669_device, (void *) 0); - device_add(&kbc_ps2_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_itoxstar_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/itoxstar/STARA.ROM", - 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(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 2, 3, 4); - device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI)); - device_add(&stpc_client_device); - device_add(&sst_flash_29ee020_device); - device_add(&w83781d_device); /* fans: Chassis, CPU, unused; temperatures: Chassis, CPU, unused */ - hwm_values.fans[2] = 0; /* unused */ - hwm_values.temperatures[2] = 0; /* unused */ - hwm_values.voltages[0] = 0; /* Vcore unused */ - - return ret; -} - -int -machine_at_arb1423c_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/arb1423c/A1423C.v12", - 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(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 0, 0, 0); - pci_register_slot(0x1E, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x1D, PCI_CARD_NORMAL, 3, 4, 1, 2); - device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI)); - device_add(&stpc_consumer2_device); - device_add(&winbond_flash_w29c020_device); - - return ret; -} - -int -machine_at_arb1479_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/arb1479/1479A.rom", - 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(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 0, 0, 0); - pci_register_slot(0x1E, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x1D, PCI_CARD_NORMAL, 3, 4, 1, 2); - device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI)); - device_add(&stpc_consumer2_device); - device_add(&winbond_flash_w29c020_device); - - return ret; -} - -int -machine_at_iach488_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/iach488/FH48800B.980", - 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(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI)); - device_add(&stpc_consumer2_device); - device_add(&sst_flash_29ee020_device); - - return ret; -} - -int -machine_at_pcm9340_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pcm9340/9340v110.bin", - 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(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x1D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x1E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x1F, PCI_CARD_NORMAL, 2, 3, 4, 1); - device_add_inst_params(&w83977_device, 1, (void *) (W83977F | W83977_AMI)); - device_add_inst_params(&w83977_device, 2, (void *) W83977F); - device_add(&stpc_elite_device); - device_add(&sst_flash_29ee020_device); - - return ret; -} - -int -machine_at_pcm5330_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pcm5330/5330_13b.bin", - 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(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_SOUTHBRIDGE_IDE, 0, 0, 0, 0); - pci_register_slot(0x0E, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); - device_add(&stpc_serial_device); - device_add_params(&w83977_device, (void *) (W83977F | W83977_370 | W83977_AMI)); - device_add(&stpc_atlas_device); - device_add(&sst_flash_29ee020_device); - - return ret; -} - -int -machine_at_ecs486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ecs486/8810AIO.32J", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&umc_hb4_device); - device_add(&umc_8886f_device); - device_add(&ide_cmd640_pci_legacy_only_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&intel_flash_bxt_device); - device_add(&kbc_ps2_ami_device); - - return ret; -} - -static const device_config_t hot433a_config[] = { - // clang-format off - { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, - .default_string = "hot433a", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "AMIBIOS 5 (101094) - Revision 433AUS33", .internal_name = "hot433a", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/hot433/433AUS33.ROM", "" } }, - { .name = "AwardBIOS v4.51PG - Revision 2.5 (by eSupport)", .internal_name = "hot433a_v451pg", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/hot433/2A4X5H21.BIN", "" } }, - { .files_no = 0 } - }, - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t hot433a_device = { - .name = "Shuttle HOT-433A", - .internal_name = "hot433a_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = hot433a_config -}; - -int -machine_at_hot433a_init(const machine_t *model) -{ - int ret = 0; - const char* fn; - - /* No ROMs available */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - int is_award = !strcmp(device_get_config_bios("bios"), "hot433a_award"); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - if (is_award) - device_add(&amstrad_megapc_nvr_device); - else - device_add(&ami_1994_nvr_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); - - device_add(&umc_hb4_device); - device_add(&umc_8886bf_device); - if (is_award) - device_add_params(&um866x_device, (void *) UM8663AF); - else - device_add_params(&um8669f_device, (void *) 0); - device_add(&winbond_flash_w29c010_device); - if (is_award) - device_add(&kbc_ps2_ami_device); - else - device_add(&kbc_at_ami_device); - - pic_toggle_latch(is_award); - - return ret; -} - -int -machine_at_84xxuuda_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/84xxuuda/uud0520s.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 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); - - device_add(&umc_hb4_device); - device_add(&umc_8886bf_device); - device_add_params(&um866x_device, (void *) UM8663BF); - device_add(&winbond_flash_w29c010_device); - device_add(&kbc_ps2_ami_device); - - return ret; -} - -int -machine_at_pl4600c_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pl4600c/SST29EE010.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* Slot 01 */ - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); /* Slot 02 */ - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); /* Onboard */ - pci_register_slot(0x13, PCI_CARD_VIDEO, 0, 0, 0, 0); /* Onboard */ - - - device_add(&umc_hb4_device); - device_add(&umc_8886af_device); - device_add_params(&um866x_device, (void *) UM8663AF); - device_add(&sst_flash_29ee010_device); - device_add(&kbc_ps2_ami_pci_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(&gd5430_onboard_pci_device); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(&ess_1688_device); - - if (fdc_current[0] == FDC_INTERNAL){ - fdd_set_turbo(0, 1); - fdd_set_turbo(1, 1); - } - - return ret; -} - -int -machine_at_atc1415_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/atc1415/1415V330.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&umc_hb4_device); - device_add(&umc_8886bf_device); - device_add(&intel_flash_bxt_device); - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_actionpc2600_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/actionpc2600/action2600.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 3); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_VIDEO, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add(&umc_hb4_device); - device_add(&umc_8886bf_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&intel_flash_bxt_device); - device_add(&kbc_ps2_tg_ami_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - return ret; -} - -int -machine_at_actiontower8400_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/actiontower8400/V31C.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x15, PCI_CARD_VIDEO, 0, 0, 0, 0); - pci_register_slot(0x16, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x14, PCI_CARD_NORMAL, 2, 3, 4, 1); - - device_add(&umc_hb4_device); - device_add(&umc_8886f_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&ide_cmd640_pci_device); - device_add(&intel_flash_bxt_device); // The ActionPC 2600 has this so I'm gonna assume this does too. - device_add(&kbc_ps2_ami_pci_device); - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - return ret; -} - -int -machine_at_m919_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/m919/9190914s.rom", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&umc_hb4_device); - device_add(&umc_8886af_device); /* AF is correct - the BIOS does IDE writes to ports 108h and 109h. */ - device_add_params(&um866x_device, (void *) UM8663BF); - device_add(&sst_flash_29ee010_device); - device_add(&kbc_at_ami_device); - - return ret; -} - -int -machine_at_spc7700plw_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/spc7700plw/77LW13FH.P24", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&umc_hb4_device); - device_add(&umc_8886af_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&intel_flash_bxt_device); - device_add(&kbc_ps2_ami_device); - - return ret; -} - -int -machine_at_ms4134_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ms4134/4alm001.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_ide_init(model); - - device_add(&ali1429g_device); - - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); - - pci_init(FLAG_MECHANISM_1 | FLAG_MECHANISM_2 | PCI_ALWAYS_EXPOSE_DEV0); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - - pci_register_slot(0x0B, PCI_CARD_SCSI, 4, 1, 2, 3); - 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(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); - - device_add(&ali1435_device); - device_add(&sst_flash_29ee010_device); - - device_add(&kbc_ps2_ami_device); - - return ret; -} - -int -machine_at_tg486gp_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tg486gp/tg486gp.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_ide_init(model); - - device_add(&ali1429g_device); - - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); - - pci_init(FLAG_MECHANISM_1 | FLAG_MECHANISM_2 | PCI_ALWAYS_EXPOSE_DEV0); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - - pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); - - device_add(&ali1435_device); - device_add(&sst_flash_29ee010_device); - - device_add(&kbc_ps2_tg_ami_device); - - return ret; -} - -int -machine_at_tg486g_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tg486g/tg486g.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - device_add(&amstrad_megapc_nvr_device); - device_add(&sis_85c471_device); - device_add(&ide_isa_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); - device_add(&kbc_ps2_tg_ami_pci_device); - - if (gfxcard[0] != VID_INTERNAL) { - for (uint16_t i = 0; i < 32768; i++) - rom[i] = mem_readb_phys(0x000c0000 + i); - } - mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); - mem_mapping_set_exec(&bios_mapping, rom); - - return ret; -} - -int -machine_at_dvent4xx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/dvent4xx/Venturis466_BIOS.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&sis_85c471_device); - device_add(&ide_cmd640_vlb_pri_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); - device_add(&kbc_ps2_phoenix_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - return ret; -} - -int -machine_at_ecsal486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ecsal486/ECS_AL486.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&ali1429g_device); - device_add(&kbc_ps2_ami_pci_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_ap4100aa_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ap4100aa/M27C512DIP28.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - device_add(&ami_1994_nvr_device); - device_add(&ali1429g_device); - device_add(&kbc_ps2_ami_pci_device); - device_add(&ide_vlb_device); - device_add_params(&um866x_device, (void *) UM8663BF); - - return ret; -} - -int -machine_at_atc1762_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/atc1762/atc1762.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&ali1429g_device); - device_add(&kbc_ps2_ami_pci_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_dataexpert386wb_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/dataexpert386wb/st0386-wb-ver2-0-618f078c738cb397184464.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&opti391_device); - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_isa486c_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/isa486c/asus-isa-486c-401a0-040591-657e2c17a0218417632602.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&isa486c_device); - device_add(&port_92_key_device); - - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_genoa486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/genoa486/AMI486.BIO", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&compaq_genoa_device); - device_add(&port_92_key_device); - - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_ga486l_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ga486l/ga-486l_bios.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&opti381_device); - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_cobalt_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/cobalt/Cobalt_2.3.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&opti499_device); - device_add(&ide_opti611_vlb_device); - device_add(&ide_isa_sec_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - - device_add(&kbc_ps2_ami_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - return ret; -} - -int -machine_at_cougar_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/cougar/COUGRMRB.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&ide_vlb_device); - - device_add(&opti499_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); - - device_add(&kbc_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_micronics386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/micronics386/386-Micronics-09-00021-EVEN.BIN", - "roms/machines/micronics386/386-Micronics-09-00021-ODD.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_init(model); - device_add(&port_92_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_micronics386px_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/micronics386/386-Micronics-09-00021-LO.BIN", - "roms/machines/micronics386/386-Micronics-09-00021-HI.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_init(model); - device_add(&port_92_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} diff --git a/src/machine/m_at_486_misc.c b/src/machine/m_at_486_misc.c new file mode 100644 index 000000000..9eb8f8d4c --- /dev/null +++ b/src/machine/m_at_486_misc.c @@ -0,0 +1,210 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of 486 Miscellaneous machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* STPC Client */ +int +machine_at_itoxstar_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/itoxstar/STARA.ROM", + 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(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 2, 3, 4); + device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI)); + device_add(&stpc_client_device); + device_add(&sst_flash_29ee020_device); + device_add(&w83781d_device); /* fans: Chassis, CPU, unused; temperatures: Chassis, CPU, unused */ + hwm_values.fans[2] = 0; /* unused */ + hwm_values.temperatures[2] = 0; /* unused */ + hwm_values.voltages[0] = 0; /* Vcore unused */ + + return ret; +} + +/* STPC Consumer-II */ +int +machine_at_arb1423c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/arb1423c/A1423C.v12", + 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(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 0, 0, 0); + pci_register_slot(0x1E, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x1D, PCI_CARD_NORMAL, 3, 4, 1, 2); + device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI)); + device_add(&stpc_consumer2_device); + device_add(&winbond_flash_w29c020_device); + + return ret; +} + +int +machine_at_arb1479_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/arb1479/1479A.rom", + 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(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 0, 0, 0); + pci_register_slot(0x1E, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x1D, PCI_CARD_NORMAL, 3, 4, 1, 2); + device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI)); + device_add(&stpc_consumer2_device); + device_add(&winbond_flash_w29c020_device); + + return ret; +} + +int +machine_at_iach488_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/iach488/FH48800B.980", + 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(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI)); + device_add(&stpc_consumer2_device); + device_add(&sst_flash_29ee020_device); + + return ret; +} + +/* STPC Elite */ +int +machine_at_pcm9340_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pcm9340/9340v110.bin", + 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(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x1D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x1E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x1F, PCI_CARD_NORMAL, 2, 3, 4, 1); + device_add_inst_params(&w83977_device, 1, (void *) (W83977F | W83977_AMI)); + device_add_inst_params(&w83977_device, 2, (void *) W83977F); + device_add(&stpc_elite_device); + device_add(&sst_flash_29ee020_device); + + return ret; +} + +/* STPC Atlas */ +int +machine_at_pcm5330_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pcm5330/5330_13b.bin", + 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(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_SOUTHBRIDGE_IDE, 0, 0, 0, 0); + pci_register_slot(0x0E, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); + device_add(&stpc_serial_device); + device_add_params(&w83977_device, (void *) (W83977F | W83977_370 | W83977_AMI)); + device_add(&stpc_atlas_device); + device_add(&sst_flash_29ee020_device); + + return ret; +} diff --git a/src/machine/m_at_486slc.c b/src/machine/m_at_486slc.c new file mode 100644 index 000000000..f237a8aea --- /dev/null +++ b/src/machine/m_at_486slc.c @@ -0,0 +1,72 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of 486SLC machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* OPTi 283 */ +int +machine_at_rycleopardlx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/rycleopardlx/486-RYC-Leopard-LX.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti283_device); + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} diff --git a/src/machine/m_at_commodore.c b/src/machine/m_at_commodore.c deleted file mode 100644 index bd4468ae1..000000000 --- a/src/machine/m_at_commodore.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. - * - * Implementation of the Commodore PC3 system. - * - * - * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, - * - * Copyright 2017-2018 Fred N. van Kempen. - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the: - * - * Free Software Foundation, Inc. - * 59 Temple Place - Suite 330 - * Boston, MA 02111-1307 - * USA. - */ -#include -#include -#include -#include -#include <86box/86box.h> -#include <86box/device.h> -#include <86box/timer.h> -#include <86box/io.h> -#include <86box/mem.h> -#include <86box/fdc_ext.h> -#include <86box/lpt.h> -#include <86box/rom.h> -#include <86box/serial.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/machine.h> -#include <86box/plat_unused.h> - -static serial_t *cmd_uart; -static lpt_t *cmd_lpt; - -static void -cbm_io_write(UNUSED(uint16_t port), uint8_t val, UNUSED(void *priv)) -{ - lpt_port_remove(cmd_lpt); - - switch (val & 3) { - case 1: - lpt_port_setup(cmd_lpt, LPT_MDA_ADDR); - break; - case 2: - lpt_port_setup(cmd_lpt, LPT1_ADDR); - break; - case 3: - lpt_port_setup(cmd_lpt, LPT2_ADDR); - break; - - default: - break; - } - - switch (val & 0xc) { - case 0x4: - serial_setup(cmd_uart, COM2_ADDR, COM2_IRQ); - break; - case 0x8: - serial_setup(cmd_uart, COM1_ADDR, COM1_IRQ); - break; - - default: - break; - } -} - -static void -cbm_io_init(void) -{ - io_sethandler(0x0230, 0x0001, NULL, NULL, NULL, cbm_io_write, NULL, NULL, NULL); -} - -int -machine_at_cmdpc_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/cmdpc30/commodore pc 30 iii even.bin", - "roms/machines/cmdpc30/commodore pc 30 iii odd.bin", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - machine_at_init(model); - - mem_remap_top(384); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - cmd_uart = device_add(&ns8250_device); - serial_set_next_inst(1); - - cmd_lpt = device_add(&lpt_port_device); - lpt_set_next_inst(1); - - cbm_io_init(); - - return ret; -} diff --git a/src/machine/m_at_common.c b/src/machine/m_at_common.c new file mode 100644 index 000000000..8d97533c5 --- /dev/null +++ b/src/machine/m_at_common.c @@ -0,0 +1,139 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of the common initialization functions for + * the PC/AT and copatible machines. + * + * Authors: Miran Grca, + * Sarah Walker, + * Jasmine Iwanek, + * Fred N. van Kempen, + * + * Copyright 2016-2025 Miran Grca. + * Copyright 2008-2025 Sarah Walker. + * Copyright 2025 Jasmine Iwanek. + * Copyright 2017-2025 Fred N. van Kempen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the: + * + * Free Software Foundation, Inc. + * 59 Temple Place - Suite 330 + * Boston, MA 02111-1307 + * USA. + */ +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/timer.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/dma.h> +#include <86box/mem.h> +#include <86box/device.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/nvr.h> +#include <86box/gameport.h> +#include <86box/keyboard.h> +#include <86box/lpt.h> +#include <86box/rom.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/machine.h> + +void +machine_at_common_init_ex(const machine_t *model, int type) +{ + machine_common_init(model); + + refresh_at_enable = 1; + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_at); + pic2_init(); + dma16_init(); + + if (!(type & 4)) + device_add(&port_6x_device); + type &= 3; + + if (type == 1) + device_add(&ibmat_nvr_device); + else if (type == 0) + device_add(&at_nvr_device); + + standalone_gameport_type = &gameport_device; +} + +void +machine_at_common_init(const machine_t *model) +{ + machine_at_common_init_ex(model, 0); +} + +void +machine_at_init(const machine_t *model) +{ + machine_at_common_init(model); + + device_add(&kbc_at_device); +} + +void +machine_at_ps2_init(const machine_t *model) +{ + machine_at_common_init(model); + + device_add(&kbc_ps2_device); +} + +void +machine_at_common_ide_init(const machine_t *model) +{ + machine_at_common_init(model); + + device_add(&ide_isa_device); +} + +void +machine_at_ibm_common_ide_init(const machine_t *model) +{ + machine_at_common_init_ex(model, 1); + + device_add(&ide_isa_device); +} + +void +machine_at_ide_init(const machine_t *model) +{ + machine_at_init(model); + + device_add(&ide_isa_device); +} + +void +machine_at_ps2_ide_init(const machine_t *model) +{ + machine_at_ps2_init(model); + + device_add(&ide_isa_device); +} + + diff --git a/src/machine/m_at_compaq.c b/src/machine/m_at_compaq.c deleted file mode 100644 index d918dbfc6..000000000 --- a/src/machine/m_at_compaq.c +++ /dev/null @@ -1,251 +0,0 @@ -/* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. - * - * Emulation of various Compaq PC's. - * - * - * - * Authors: Sarah Walker, - * Miran Grca, - * TheCollector1995, - * - * Copyright 2008-2018 Sarah Walker. - * Copyright 2016-2018 Miran Grca. - */ -#include -#include -#include -#include -#include -#include -#include <86box/86box.h> -#include "cpu.h" -#include <86box/io.h> -#include <86box/timer.h> -#include <86box/pit.h> -#include <86box/mem.h> -#include <86box/rom.h> -#include <86box/device.h> -#include <86box/chipset.h> -#include <86box/keyboard.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/fdc_ext.h> -#include <86box/hdc.h> -#include <86box/hdc_ide.h> -#include <86box/machine.h> -#include <86box/video.h> -#include <86box/vid_cga.h> -#include <86box/vid_cga_comp.h> -#include <86box/plat_unused.h> - -enum { - COMPAQ_PORTABLEII = 0, - COMPAQ_PORTABLEIII, - COMPAQ_PORTABLEIII386, - COMPAQ_DESKPRO386, - COMPAQ_DESKPRO386_05_1988 -}; - -static int compaq_machine_type = 0; - -/* Compaq Deskpro 386 remaps RAM from 0xA0000-0xFFFFF to 0xFA0000-0xFFFFFF */ -static mem_mapping_t ram_mapping; - - -static uint8_t -read_ram(uint32_t addr, UNUSED(void *priv)) -{ - addr = (addr & 0x7ffff) + 0x80000; - addreadlookup(mem_logical_addr, addr); - - return (ram[addr]); -} - -static uint16_t -read_ramw(uint32_t addr, UNUSED(void *priv)) -{ - addr = (addr & 0x7ffff) + 0x80000; - addreadlookup(mem_logical_addr, addr); - - return (*(uint16_t *) &ram[addr]); -} - -static uint32_t -read_raml(uint32_t addr, UNUSED(void *priv)) -{ - addr = (addr & 0x7ffff) + 0x80000; - addreadlookup(mem_logical_addr, addr); - - return (*(uint32_t *) &ram[addr]); -} - -static void -write_ram(uint32_t addr, uint8_t val, UNUSED(void *priv)) -{ - addr = (addr & 0x7ffff) + 0x80000; - addwritelookup(mem_logical_addr, addr); - - mem_write_ramb_page(addr, val, &pages[addr >> 12]); -} - -static void -write_ramw(uint32_t addr, uint16_t val, UNUSED(void *priv)) -{ - addr = (addr & 0x7ffff) + 0x80000; - addwritelookup(mem_logical_addr, addr); - - mem_write_ramw_page(addr, val, &pages[addr >> 12]); -} - -static void -write_raml(uint32_t addr, uint32_t val, UNUSED(void *priv)) -{ - addr = (addr & 0x7ffff) + 0x80000; - addwritelookup(mem_logical_addr, addr); - - mem_write_raml_page(addr, val, &pages[addr >> 12]); -} - -static void -machine_at_compaq_init(const machine_t *model, int type) -{ - compaq_machine_type = type; - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - if (type < COMPAQ_PORTABLEIII386) { - mem_remap_top(384); - mem_mapping_add(&ram_mapping, 0xfa0000, 0x60000, - read_ram, read_ramw, read_raml, - write_ram, write_ramw, write_raml, - 0xa0000 + ram, MEM_MAPPING_INTERNAL, NULL); - } - - video_reset(gfxcard[0]); - - switch (type) { - case COMPAQ_PORTABLEII: - machine_at_common_init(model); - device_add(&kbc_at_compaq_device); - break; - - case COMPAQ_PORTABLEIII: - if (hdc_current[0] == HDC_INTERNAL) - device_add(&ide_isa_device); - if (gfxcard[0] == VID_INTERNAL) - device_add(&compaq_plasma_device); - - machine_at_common_init(model); - device_add(&kbc_at_compaq_device); - break; - - case COMPAQ_PORTABLEIII386: - if (hdc_current[0] == HDC_INTERNAL) - device_add(&ide_isa_device); - if (gfxcard[0] == VID_INTERNAL) - device_add(&compaq_plasma_device); - device_add(&compaq_386_device); - machine_at_common_init(model); - device_add(&kbc_at_compaq_device); - break; - - case COMPAQ_DESKPRO386: - case COMPAQ_DESKPRO386_05_1988: - device_add(&compaq_386_device); - machine_at_common_init(model); - device_add(&kbc_at_compaq_device); - break; - - default: - break; - } -} - -int -machine_at_portableii_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleavedr("roms/machines/portableii/109740-001.rom", - "roms/machines/portableii/109739-001.rom", - 0x000f8000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_compaq_init(model, COMPAQ_PORTABLEII); - - return ret; -} - -int -machine_at_portableiii_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linearr("roms/machines/portableiii/K Combined.bin", - 0x000f8000, 65536, 0); - - - if (bios_only || !ret) - return ret; - - machine_at_compaq_init(model, COMPAQ_PORTABLEIII); - - return ret; -} - -int -machine_at_portableiii386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linearr("roms/machines/portableiii/P.2 Combined.bin", - 0x000f0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_compaq_init(model, COMPAQ_PORTABLEIII386); - - return ret; -} - -int -machine_at_deskpro386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linearr("roms/machines/deskpro386/1986-09-04-HI.json.bin", - 0x000f8000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_compaq_init(model, COMPAQ_DESKPRO386); - - return ret; -} - -int -machine_at_deskpro386_05_1988_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linearr("roms/machines/deskpro386/1988-05-10.json.bin", - 0x000f8000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_compaq_init(model, COMPAQ_DESKPRO386_05_1988); - - return ret; -} diff --git a/src/machine/m_at_misc.c b/src/machine/m_at_misc.c index ad26f56e5..268cf7f7d 100644 --- a/src/machine/m_at_misc.c +++ b/src/machine/m_at_misc.c @@ -8,11 +8,9 @@ * * Implementation of Miscellaneous, Fake, Hypervisor machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 9c4875094..f92917505 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -8,11 +8,9 @@ * * Implementation of Slot 1 machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -40,6 +38,39 @@ #include <86box/clock.h> #include <86box/snd_ac97.h> +/* ALi ALADDiN-PRO II */ +int +machine_at_m729_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/m729/M729NEW.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, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE_IDE, 1, 2, 3, 4); + pci_register_slot(0x03, PCI_CARD_SOUTHBRIDGE_PMU, 1, 2, 3, 4); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2); + device_add(&ali1621_device); + device_add(&ali1543c_device); /* +0 */ + device_add(&winbond_flash_w29c010_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 512); + + return ret; +} + +/* i440FX */ int machine_at_acerv62x_init(const machine_t *model) { @@ -119,6 +150,7 @@ machine_at_kn97_init(const machine_t *model) return ret; } +/* i440LX */ int machine_at_lx6_init(const machine_t *model) { @@ -250,6 +282,7 @@ machine_at_ma30d_init(const machine_t *model) return ret; } +/* i440EX */ int machine_at_p6i440e2_init(const machine_t *model) { @@ -281,109 +314,7 @@ machine_at_p6i440e2_init(const machine_t *model) return ret; } -int -machine_at_p2bls_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p2bls/1014ls.003", - 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(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x06, PCI_CARD_SCSI, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_NETWORK, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); -#if 0 - device_add(ics9xxx_get(ICS9150_08)); /* setting proper speeds requires some interaction with the AS97127F ASIC */ -#endif - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0xF, 256); - device_add(&w83781d_device); /* fans: Chassis, CPU, Power; temperatures: MB, unused, CPU */ - hwm_values.temperatures[1] = 0; /* unused */ - hwm_values.temperatures[2] -= 3; /* CPU offset */ - - return ret; -} - -int -machine_at_lgibmx7g_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/lgibmx7g/ms6119.331", - 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(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); - device_add(&winbond_flash_w29c020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - - return ret; -} - -int -machine_at_p3bf_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p3bf/1008f.004", - 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(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); - device_add(ics9xxx_get(ICS9250_08)); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0xF, 256); - device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */ - hwm_values.voltages[4] = hwm_values.voltages[5]; /* +12V reading not in line with other boards; appears to be close to the -12V reading */ - - return ret; -} - +/* i440BX */ int machine_at_bf6_init(const machine_t *model) { @@ -447,6 +378,79 @@ machine_at_bx6_init(const machine_t *model) return ret; } +int +machine_at_p2bls_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p2bls/1014ls.003", + 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(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x06, PCI_CARD_SCSI, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_NETWORK, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); +#if 0 + device_add(ics9xxx_get(ICS9150_08)); /* setting proper speeds requires some interaction with the AS97127F ASIC */ +#endif + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0xF, 256); + device_add(&w83781d_device); /* fans: Chassis, CPU, Power; temperatures: MB, unused, CPU */ + hwm_values.temperatures[1] = 0; /* unused */ + hwm_values.temperatures[2] -= 3; /* CPU offset */ + + return ret; +} + +int +machine_at_p3bf_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p3bf/1008f.004", + 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(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(ics9xxx_get(ICS9250_08)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0xF, 256); + device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */ + hwm_values.voltages[4] = hwm_values.voltages[5]; /* +12V reading not in line with other boards; appears to be close to the -12V reading */ + + return ret; +} + int machine_at_ax6bc_init(const machine_t *model) { @@ -479,36 +483,6 @@ machine_at_ax6bc_init(const machine_t *model) return ret; } -int -machine_at_atc6310bxii_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/atc6310bxii/6310s102.bin", - 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_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&slc90e66_device); - device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - - return ret; -} - int machine_at_686bx_init(const machine_t *model) { @@ -545,6 +519,36 @@ machine_at_686bx_init(const machine_t *model) return ret; } +int +machine_at_lgibmx7g_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/lgibmx7g/ms6119.331", + 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(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); + device_add(&winbond_flash_w29c020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + return ret; +} + int machine_at_p6sba_init(const machine_t *model) { @@ -619,6 +623,131 @@ machine_at_s1846_init(const machine_t *model) return ret; } +/* i440ZX */ +int +machine_at_vei8_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/vei8/QHW1001.BIN", + 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(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440zx_device); + device_add(&piix4e_device); + device_add_params(&fdc37m60x_device, (void *) (FDC37XXX2 | FDC37XXXX_370)); + device_add(ics9xxx_get(ICS9250_08)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 512); + device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */ + + return ret; +} + +static void +machine_at_ms6168_common_init(const machine_t *model) +{ + 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(0x14, PCI_CARD_SOUND, 3, 4, 1, 2); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440zx_device); + device_add(&piix4e_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&voodoo_3_2000_agp_onboard_8m_device); + + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 256); + + if (sound_card_current[0] == SOUND_INTERNAL) { + device_add(machine_get_snd_device(machine)); + device_add(&cs4297_device); + } +} + +int +machine_at_ms6168_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ms6168/w6168ims.130", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ms6168_common_init(model); + + return ret; +} + +int +machine_at_borapro_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/borapro/MS6168V2.50", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ms6168_common_init(model); + + return ret; +} + +/* SMSC VictoryBX-66 */ +int +machine_at_atc6310bxii_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/atc6310bxii/6310s102.bin", + 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_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&slc90e66_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + return ret; +} + +/* VIA Apollo Pro */ int machine_at_ficka6130_init(const machine_t *model) { @@ -650,6 +779,7 @@ machine_at_ficka6130_init(const machine_t *model) return ret; } +/* VIA Apollo Pro 133 */ int machine_at_p3v133_init(const machine_t *model) { @@ -686,6 +816,7 @@ machine_at_p3v133_init(const machine_t *model) return ret; } +/* VIA Apollo Pro 133A */ int machine_at_p3v4x_init(const machine_t *model) { @@ -761,129 +892,7 @@ machine_at_gt694va_init(const machine_t *model) return ret; } -int -machine_at_vei8_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/vei8/QHW1001.BIN", - 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(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440zx_device); - device_add(&piix4e_device); - device_add_params(&fdc37m60x_device, (void *) (FDC37XXX2 | FDC37XXXX_370)); - device_add(ics9xxx_get(ICS9250_08)); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 512); - device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */ - - return ret; -} - -static void -machine_at_ms6168_common_init(const machine_t *model) -{ - 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(0x14, PCI_CARD_SOUND, 3, 4, 1, 2); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440zx_device); - device_add(&piix4e_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(&voodoo_3_2000_agp_onboard_8m_device); - - device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 256); - - if (sound_card_current[0] == SOUND_INTERNAL) { - device_add(machine_get_snd_device(machine)); - device_add(&cs4297_device); - } -} - -int -machine_at_borapro_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/borapro/MS6168V2.50", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ms6168_common_init(model); - - return ret; -} - -int -machine_at_ms6168_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ms6168/w6168ims.130", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ms6168_common_init(model); - - return ret; -} - -int -machine_at_m729_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/m729/M729NEW.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, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE_IDE, 1, 2, 3, 4); - pci_register_slot(0x03, PCI_CARD_SOUTHBRIDGE_PMU, 1, 2, 3, 4); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2); - device_add(&ali1621_device); - device_add(&ali1543c_device); /* +0 */ - device_add(&winbond_flash_w29c010_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 512); - - return ret; -} - +/* SiS 5600 */ int machine_at_p6f99_init(const machine_t *model) { diff --git a/src/machine/m_at_slot1_2.c b/src/machine/m_at_slot1_2.c new file mode 100644 index 000000000..2c8151abe --- /dev/null +++ b/src/machine/m_at_slot1_2.c @@ -0,0 +1,78 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of Slot 1/2 machines. + * + * Slot 2 is quite a rare type of Slot. Used mostly by Pentium + * II and III Xeons. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/mem.h> +#include <86box/io.h> +#include <86box/rom.h> +#include <86box/pci.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/keyboard.h> +#include <86box/flash.h> +#include <86box/sio.h> +#include <86box/hwm.h> +#include <86box/spd.h> +#include <86box/video.h> +#include <86box/clock.h> +#include "cpu.h" +#include <86box/machine.h> + +/* i440GX */ +int +machine_at_fw6400gx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/fw6400gx/FWGX1211.ROM", + 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, 0, 0, 0, 4); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); + + device_add(&i440gx_device); + device_add(&piix4e_device); + device_add_params(&pc87309_device, (void *) (PCX730X_15C | PCX730X_AMI | PC87309_PC87309)); + device_add(ics9xxx_get(ICS9250_08)); + device_add(&sst_flash_29ee020_device); + spd_register(SPD_TYPE_SDRAM, 0xF, 512); + device_add(&w83781d_device); /* fans: Chassis, Power, CPU; temperatures: System, CPU, unused */ + hwm_values.temperatures[3] = 0; /* unused */ + hwm_values.voltages[1] = 1500; /* Vtt */ + + return ret; +} diff --git a/src/machine/m_at_slot1_socket370.c b/src/machine/m_at_slot1_socket370.c new file mode 100644 index 000000000..c52885965 --- /dev/null +++ b/src/machine/m_at_slot1_socket370.c @@ -0,0 +1,151 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of Slot 1/Socket 370 machines machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/mem.h> +#include <86box/io.h> +#include <86box/rom.h> +#include <86box/pci.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/keyboard.h> +#include <86box/flash.h> +#include <86box/sio.h> +#include <86box/hwm.h> +#include <86box/spd.h> +#include <86box/video.h> +#include "cpu.h" +#include <86box/machine.h> +#include <86box/clock.h> +#include <86box/sound.h> +#include <86box/snd_ac97.h> + +/* i440BX */ +int +machine_at_prosignias31x_bx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/prosignias31x_bx/p6bxt-ap-092600.bin", + 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(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0d, PCI_CARD_SOUND, 4, 3, 2, 1); /* assumed */ + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&winbond_flash_w29c020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + device_add(&gl520sm_2d_device); /* fans: CPU, Chassis; temperature: System */ + hwm_values.temperatures[0] += 2; /* System offset */ + hwm_values.temperatures[1] += 2; /* CPU offset */ + hwm_values.voltages[0] = 3300; /* Vcore and 3.3V are swapped */ + hwm_values.voltages[2] = hwm_get_vcore(); + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(&cmi8738_onboard_device); + + return ret; +} + +int +machine_at_s1857_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/s1857/BX57200A.ROM", + 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(0x0F, PCI_CARD_SOUND, 1, 0, 0, 0); + pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + if (sound_card_current[0] == SOUND_INTERNAL) { + device_add(machine_get_snd_device(machine)); + device_add(&cs4297_device); /* no good pictures, but the marking looks like CS4297 from a distance */ + } + + return ret; +} + +/* VIA Apollo Pro 133 */ +int +machine_at_p6bat_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p6bat/bata+56.BIN", + 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, 0, 0, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0d, PCI_CARD_NORMAL, 4, 3, 2, 1); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&via_apro133_device); + device_add(&via_vt82c596b_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(&cmi8738_onboard_device); + + return ret; +} diff --git a/src/machine/m_at_slot2.c b/src/machine/m_at_slot2.c index 461ad925a..20b5f05f7 100644 --- a/src/machine/m_at_slot2.c +++ b/src/machine/m_at_slot2.c @@ -10,11 +10,9 @@ * * Slot 2 is quite a rare type of Slot. Used mostly by Pentium II & III Xeons * - * - * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -40,6 +38,7 @@ #include "cpu.h" #include <86box/machine.h> +/* i440GX */ int machine_at_6gxu_init(const machine_t *model) { @@ -111,40 +110,3 @@ machine_at_s2dge_init(const machine_t *model) return ret; } - -int -machine_at_fw6400gx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/fw6400gx/FWGX1211.ROM", - 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, 0, 0, 0, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); - - device_add(&i440gx_device); - device_add(&piix4e_device); - device_add_params(&pc87309_device, (void *) (PCX730X_15C | PCX730X_AMI | PC87309_PC87309)); - device_add(ics9xxx_get(ICS9250_08)); - device_add(&sst_flash_29ee020_device); - spd_register(SPD_TYPE_SDRAM, 0xF, 512); - device_add(&w83781d_device); /* fans: Chassis, Power, CPU; temperatures: System, CPU, unused */ - hwm_values.temperatures[3] = 0; /* unused */ - hwm_values.voltages[1] = 1500; /* Vtt */ - - return ret; -} diff --git a/src/machine/m_at_socket1.c b/src/machine/m_at_socket1.c new file mode 100644 index 000000000..c854792ad --- /dev/null +++ b/src/machine/m_at_socket1.c @@ -0,0 +1,397 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of Socket 168 and 1 machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* CS4031 */ +int +machine_at_cs4031_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/cs4031/CHIPS_1.AMI", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&cs4031_device); + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* OPTi 381 */ +int +machine_at_ga486l_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ga486l/ga-486l_bios.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&opti381_device); + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* OPTi 498 */ +int +machine_at_mvi486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/mvi486/MVI627.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti498_device); + + device_add(&kbc_at_device); + + device_add(&ide_isa_device); + device_add_params(&pc873xx_device, (void *) (PCX73XX_IDE_PRI | PCX730X_398)); + + return ret; +} + +/* SiS 401 */ +static void +machine_at_sis401_common_init(const machine_t *model) +{ + machine_at_common_init(model); + device_add(&sis_85c401_device); + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); +} + +int +machine_at_isa486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/isa486/ISA-486.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis401_common_init(model); + + return ret; +} + +int +machine_at_sis401_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/sis401/SIS401-2.AMI", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis401_common_init(model); + + return ret; +} + +/* SiS 460 */ +int +machine_at_av4_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/av4/amibios_486dx_isa_bios_aa4025963.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&sis_85c460_device); + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* SiS 471 */ +int +machine_at_advantage40xxd_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/advantage40xxd/AST101.09A", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&sis_85c471_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&kbc_ps2_phoenix_device); + device_add_params(&um866x_device, (void *) (UM82C863F | UM866X_IDE_PRI)); + + device_add(&intel_flash_bxt_device); + + return ret; +} + +/* Symphony SL42C460 */ +int +machine_at_dtk461_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/dtk461/DTK.BIO", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&sl82c461_device); + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* VIA VT82C495 */ +int +machine_at_486vchd_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486vchd/486-4386-VC-HD.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&via_vt82c49x_device); + device_add(&kbc_at_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* VLSI 82C480 */ +int +machine_at_vect486vl_init(const machine_t *model) // has HDC problems +{ + int ret; + + ret = bios_load_linear("roms/machines/vect486vl/aa0500.ami", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + machine_at_common_init_ex(model, 2); + + device_add(&vl82c480_device); + + device_add(&vl82c113_device); + + device_add(&ide_isa_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); + + return ret; +} + +/* VLSI 82C481 */ +int +machine_at_d824_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/d824/fts-biosupdated824noflashbiosepromv320-320334-160.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + machine_at_common_init_ex(model, 2); + + device_add(&vl82c480_device); + + /* + Technically, it should be the VL82C114 but we do not have + a proper datasheet of it that tells us the registers. + */ + device_add(&vl82c113_device); + + device_add(&ide_isa_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C651); + + return ret; +} + +/* VLSI 82C486 */ +int +machine_at_tuliptc38_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tuliptc38/TULIP1.BIN", + 0x000f0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + device_add(&vl82c486_device); + device_add(&tulip_jumper_device); + + device_add(&vl82c113_device); + + device_add(&ide_isa_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); + + if (gfxcard[0] == VID_INTERNAL) { + bios_load_aux_linear("roms/machines/tuliptc38/VBIOS.BIN", + 0x000c0000, 32768, 0); + + device_add(machine_get_vid_device(machine)); + } else for (uint16_t i = 0; i < 32768; i++) + rom[i] = mem_readb_phys(0x000c0000 + i); + + mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); + mem_mapping_set_exec(&bios_mapping, rom); + + return ret; +} + +/* ZyMOS Poach */ +int +machine_at_isa486c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/isa486c/asus-isa-486c-401a0-040591-657e2c17a0218417632602.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&isa486c_device); + device_add(&port_92_key_device); + + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_genoa486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/genoa486/AMI486.BIO", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&compaq_genoa_device); + device_add(&port_92_key_device); + + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} diff --git a/src/machine/m_at_socket2.c b/src/machine/m_at_socket2.c new file mode 100644 index 000000000..2ddbd288c --- /dev/null +++ b/src/machine/m_at_socket2.c @@ -0,0 +1,374 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of Socket 2 machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* ACC 2168 */ +int +machine_at_pb410a_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pb410a/pb410a.080337.4abf.u25.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_ide_init(model); + + device_add(&kbc_ps2_device); + + device_add(&acc3221_device); + device_add(&acc2168_device); + + device_add(&phoenix_486_jumper_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} + +/* ALi M1429G */ +int +machine_at_acera1g_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/acera1g/4alo001.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&ali1429g_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&gd5428_onboard_device); + + device_add(&kbc_ps2_acer_pci_device); + + device_add_params(&pc87310_device, (void *) (PC87310_ALI)); + device_add(&ide_ali5213_device); + + return ret; +} + +static void +machine_at_ali1429_common_init(const machine_t *model, int is_green) +{ + machine_at_common_init(model); + + if (is_green) + device_add(&ali1429g_device); + else + device_add(&ali1429_device); + + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); +} + +int +machine_at_winbios1429_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/win486/ali1429g.amw", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ali1429_common_init(model, 1); + + return ret; +} + +int +machine_at_ali1429_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ali1429/ami486.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ali1429_common_init(model, 0); + + return ret; +} + +/* i420TX */ +int +machine_at_pci400ca_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pci400ca/486-AA008851.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SCSI, 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(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&kbc_at_ami_device); + device_add(&sio_device); + device_add(&intel_flash_bxt_ami_device); + + device_add(&i420tx_device); + device_add(&ncr53c810_onboard_pci_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* IMS 8848 */ +int +machine_at_g486ip_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/g486ip/G486IP.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add(&ami_1992_nvr_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 03 = Slot 1 */ + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 05 = Slot 3 */ + device_add(&kbc_ps2_ami_pci_device); /* AMI Megakey 1993 stanalone ('P') */ + + device_add(&ims8848_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* OPTi 499 */ +int +machine_at_cobalt_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/cobalt/Cobalt_2.3.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti499_device); + device_add(&ide_opti611_vlb_device); + device_add(&ide_isa_sec_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + + device_add(&kbc_ps2_ami_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} + +int +machine_at_cougar_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/cougar/COUGRMRB.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&ide_vlb_device); + + device_add(&opti499_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); + + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* SiS 461 */ +int +machine_at_decpclpv_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/decpclpv/bios.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&sis_85c461_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&kbc_ps2_phoenix_pci_device); + + device_add(&ide_isa_2ch_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C663 | FDC37C6XX_IDE_PRI)); + + return ret; +} + +int +machine_at_dell466np_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/dell466np/466np.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&sis_85c461_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + else { + for (uint16_t i = 0; i < 32768; i++) + rom[i] = mem_readb_phys(0x000c0000 + i); + } + mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); + mem_mapping_set_exec(&bios_mapping, rom); + + device_add(&kbc_ps2_phoenix_pci_device); + + device_add(&ide_isa_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C661 | FDC37C6XX_IDE_PRI)); + + return ret; +} + +int +machine_at_valuepoint433_init(const machine_t *model) // hangs without the PS/2 mouse +{ + int ret; + + ret = bios_load_linear("roms/machines/valuepoint433/$IMAGEP.FLH", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + device_add(&sis_85c461_device); + if (gfxcard[0] == VID_INTERNAL) + device_add(&et4000w32_onboard_device); + + device_add_params(&fdc37c6xx_device, (void *) (FDC37C661 | FDC37C6XX_IDE_PRI)); + device_add(&kbc_ps2_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* VLSI 82C480 */ +int +machine_at_martin_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/martin/NONSCSI.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + device_add(&vl82c480_device); + device_add(&vl82c113_device); + + device_add(&ide_vlb_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); + + device_add(&intel_flash_bxt_device); + + return ret; +} diff --git a/src/machine/m_at_socket3.c b/src/machine/m_at_socket3.c new file mode 100644 index 000000000..ca45064b1 --- /dev/null +++ b/src/machine/m_at_socket3.c @@ -0,0 +1,419 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of Socket 3 machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* ALi M1429G */ +int +machine_at_atc1762_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/atc1762/atc1762.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&ali1429g_device); + device_add(&kbc_ps2_ami_pci_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_ecsal486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ecsal486/ECS_AL486.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&ali1429g_device); + device_add(&kbc_ps2_ami_pci_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_ap4100aa_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ap4100aa/M27C512DIP28.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + device_add(&ami_1994_nvr_device); + device_add(&ali1429g_device); + device_add(&kbc_ps2_ami_pci_device); + device_add(&ide_vlb_device); + device_add_params(&um866x_device, (void *) UM8663BF); + + return ret; +} + +/* Contaq 82C596A */ +int +machine_at_4gpv5_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/4gpv5/4GPV5.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&contaq_82c596a_device); + + device_add(&kbc_at_device); + + return ret; +} + +/* Contaq 82C597 */ +int +machine_at_greenb_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/greenb/4gpv31-ami-1993-8273517.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&contaq_82c597_device); + + device_add(&kbc_at_ami_device); + + return ret; +} + +/* OPTi 895 */ +static void +machine_at_403tg_common_init(const machine_t *model, int nvr_hack) +{ + if (nvr_hack) { + machine_at_common_init_ex(model, 2); + device_add(&ami_1994_nvr_device); + } else + machine_at_common_init(model); + + device_add(&opti895_device); + + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); +} + +int +machine_at_403tg_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/403tg/403TG.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_403tg_common_init(model, 0); + + return ret; +} + +int +machine_at_403tg_d_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/403tg_d/J403TGRevD.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_403tg_common_init(model, 1); + + return ret; +} + +int +machine_at_403tg_d_mr_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/403tg_d/MRBiosOPT895.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_403tg_common_init(model, 0); + + return ret; +} + +/* SiS 461 */ +int +machine_at_acerv10_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/acerv10/ALL.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&sis_85c461_device); + device_add(&kbc_ps2_acer_pci_device); + device_add(&ide_isa_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* SiS 471 */ +static void +machine_at_sis_85c471_common_init(const machine_t *model) +{ + machine_at_common_init(model); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&sis_85c471_device); +} + +int +machine_at_win471_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/win471/486-SiS_AC0360136.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis_85c471_common_init(model); + device_add(&kbc_at_ami_device); + + return ret; +} + +int +machine_at_vi15g_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/vi15g/vi15gr23.rom", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis_85c471_common_init(model); + device_add(&kbc_at_ami_device); + + return ret; +} + +int +machine_at_vli486sv2g_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/vli486sv2g/0402.001", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis_85c471_common_init(model); + device_add(&kbc_ps2_ami_device); + + return ret; +} + +int +machine_at_dvent4xx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/dvent4xx/Venturis466_BIOS.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&sis_85c471_device); + device_add(&ide_cmd640_vlb_pri_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + device_add(&kbc_ps2_phoenix_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} + +int +machine_at_dtk486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/dtk486/4siw005.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis_85c471_common_init(model); + device_add(&kbc_at_device); + + return ret; +} + +int +machine_at_ami471_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ami471/SIS471BE.AMI", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis_85c471_common_init(model); + device_add(&kbc_at_ami_device); + + return ret; +} + +int +machine_at_px471_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/px471/SIS471A1.PHO", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis_85c471_common_init(model); + device_add(&ide_vlb_device); + device_add(&kbc_at_device); + + return ret; +} + +int +machine_at_tg486g_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tg486g/tg486g.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add(&amstrad_megapc_nvr_device); + device_add(&sis_85c471_device); + device_add(&ide_isa_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); + device_add(&kbc_ps2_tg_ami_pci_device); + + if (gfxcard[0] != VID_INTERNAL) { + for (uint16_t i = 0; i < 32768; i++) + rom[i] = mem_readb_phys(0x000c0000 + i); + } + mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); + mem_mapping_set_exec(&bios_mapping, rom); + + return ret; +} diff --git a/src/machine/m_at_socket370.c b/src/machine/m_at_socket370.c index de07d8c41..60da8e2b8 100644 --- a/src/machine/m_at_socket370.c +++ b/src/machine/m_at_socket370.c @@ -6,13 +6,11 @@ * * This file is part of the 86Box distribution. * - * Implementation of Socket 370(PGA370) machines. - * - * + * Implementation of Socket 370 (PGA370) machines. * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -40,6 +38,7 @@ #include <86box/sound.h> #include <86box/snd_ac97.h> +/* i440LX */ int machine_at_s370slm_init(const machine_t *model) { @@ -73,12 +72,13 @@ machine_at_s370slm_init(const machine_t *model) return ret; } +/* i440BX */ int -machine_at_prosignias31x_bx_init(const machine_t *model) +machine_at_awo671r_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/prosignias31x_bx/p6bxt-ap-092600.bin", + ret = bios_load_linear("roms/machines/awo671r/a08139c.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -89,35 +89,30 @@ machine_at_prosignias31x_bx_init(const machine_t *model) 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(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0d, PCI_CARD_SOUND, 4, 3, 2, 1); /* assumed */ - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0D, PCI_CARD_VIDEO, 2, 3, 4, 1); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440bx_device); device_add(&piix4e_device); - device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); - device_add(&winbond_flash_w29c020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - device_add(&gl520sm_2d_device); /* fans: CPU, Chassis; temperature: System */ - hwm_values.temperatures[0] += 2; /* System offset */ - hwm_values.temperatures[1] += 2; /* CPU offset */ - hwm_values.voltages[0] = 3300; /* Vcore and 3.3V are swapped */ - hwm_values.voltages[2] = hwm_get_vcore(); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(&cmi8738_onboard_device); + device_add_inst_params(&w83977_device, 1, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add_inst_params(&w83977_device, 2, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&sst_flash_39sf020_device); + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + spd_register(SPD_TYPE_SDRAM, 0x3, 256); return ret; } int -machine_at_s1857_init(const machine_t *model) +machine_at_ambx133_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/s1857/BX57200A.ROM", + ret = bios_load_linear("roms/machines/ambx133/mkbx2vg2.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -128,91 +123,21 @@ machine_at_s1857_init(const machine_t *model) 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(0x0F, PCI_CARD_SOUND, 1, 0, 0, 0); - pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440bx_device); device_add(&piix4e_device); device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - - if (sound_card_current[0] == SOUND_INTERNAL) { - device_add(machine_get_snd_device(machine)); - device_add(&cs4297_device); /* no good pictures, but the marking looks like CS4297 from a distance */ - } - - return ret; -} - -int -machine_at_p6bap_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p6bap/bapa14a.BIN", - 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, 0, 0, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0d, PCI_CARD_NORMAL, 4, 3, 2, 1); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&via_apro133a_device); /* Rebranded as ET82C693A */ - device_add(&via_vt82c596b_device); /* Rebranded as ET82C696B */ - device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(&cmi8738_onboard_device); - - return ret; -} - -int -machine_at_p6bat_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p6bat/bata+56.BIN", - 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, 0, 0, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0d, PCI_CARD_NORMAL, 4, 3, 2, 1); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&via_apro133_device); - device_add(&via_vt82c596b_device); - device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(&cmi8738_onboard_device); + device_add(&gl518sm_2d_device); /* fans: CPUFAN1, CPUFAN2; temperature: CPU */ + hwm_values.fans[1] += 500; + hwm_values.temperatures[0] += 4; /* CPU offset */ + hwm_values.voltages[1] = RESISTOR_DIVIDER(12000, 10, 2); /* different 12V divider in BIOS (10K/2K?) */ return ret; } @@ -253,6 +178,39 @@ machine_at_cubx_init(const machine_t *model) return ret; } +/* i440ZX */ +int +machine_at_63a1_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/63a1/63a-q3.bin", + 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(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* Integrated Sound? */ + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440zx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 256); + + return ret; +} + +/* SMSC VictoryBX-66 */ int machine_at_atc7020bxii_init(const machine_t *model) { @@ -324,106 +282,7 @@ machine_at_m773_init(const machine_t *model) return ret; } -int -machine_at_ambx133_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ambx133/mkbx2vg2.bin", - 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(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - device_add(&gl518sm_2d_device); /* fans: CPUFAN1, CPUFAN2; temperature: CPU */ - hwm_values.fans[1] += 500; - hwm_values.temperatures[0] += 4; /* CPU offset */ - hwm_values.voltages[1] = RESISTOR_DIVIDER(12000, 10, 2); /* different 12V divider in BIOS (10K/2K?) */ - - return ret; -} - -int -machine_at_awo671r_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/awo671r/a08139c.bin", - 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(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0D, PCI_CARD_VIDEO, 2, 3, 4, 1); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add_inst_params(&w83977_device, 1, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); - device_add_inst_params(&w83977_device, 2, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); - device_add(&sst_flash_39sf020_device); - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - spd_register(SPD_TYPE_SDRAM, 0x3, 256); - - return ret; -} - -int -machine_at_63a1_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/63a1/63a-q3.bin", - 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(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* Integrated Sound? */ - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440zx_device); - device_add(&piix4e_device); - device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 256); - - return ret; -} - +/* VIA Apollo Pro */ int machine_at_apas3_init(const machine_t *model) { @@ -455,6 +314,80 @@ machine_at_apas3_init(const machine_t *model) return ret; } +/* VIA Apollo Pro 133 */ +int +machine_at_p6bap_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p6bap/bapa14a.BIN", + 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, 0, 0, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0d, PCI_CARD_NORMAL, 4, 3, 2, 1); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&via_apro133a_device); /* Rebranded as ET82C693A */ + device_add(&via_vt82c596b_device); /* Rebranded as ET82C696B */ + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(&cmi8738_onboard_device); + + return ret; +} + +/* VIA Apollo Pro 133A */ +int +machine_at_6via90ap_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/6via90ap/90ap10.bin", + 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(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&via_apro133a_device); + device_add(&via_vt82c686b_device); /* fans: CPU1, CPU2; temperatures: CPU, System, unused */ + device_add(&kbc_ps2_ami_pci_device); + device_add(ics9xxx_get(ICS9250_18)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 1024); + hwm_values.temperatures[0] += 2; /* CPU offset */ + hwm_values.temperatures[1] += 2; /* System offset */ + hwm_values.temperatures[2] = 0; /* unused */ + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(&alc100_device); /* ALC100P identified on similar Acorp boards (694TA, 6VIA90A1) */ + + return ret; +} + int machine_at_cuv4xls_init(const machine_t *model) { @@ -494,44 +427,7 @@ machine_at_cuv4xls_init(const machine_t *model) return ret; } -int -machine_at_6via90ap_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/6via90ap/90ap10.bin", - 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(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&via_apro133a_device); - device_add(&via_vt82c686b_device); /* fans: CPU1, CPU2; temperatures: CPU, System, unused */ - device_add(&kbc_ps2_ami_pci_device); - device_add(ics9xxx_get(ICS9250_18)); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 1024); - hwm_values.temperatures[0] += 2; /* CPU offset */ - hwm_values.temperatures[1] += 2; /* System offset */ - hwm_values.temperatures[2] = 0; /* unused */ - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(&alc100_device); /* ALC100P identified on similar Acorp boards (694TA, 6VIA90A1) */ - - return ret; -} - +/* SiS 600 */ int machine_at_7sbb_init(const machine_t *model) { diff --git a/src/machine/m_at_socket3_pci.c b/src/machine/m_at_socket3_pci.c new file mode 100644 index 000000000..3803e486f --- /dev/null +++ b/src/machine/m_at_socket3_pci.c @@ -0,0 +1,1439 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of Socket 3 PCI machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* ALi M1429G */ +int +machine_at_ms4134_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ms4134/4alm001.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + + device_add(&ali1429g_device); + + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); + + pci_init(FLAG_MECHANISM_1 | FLAG_MECHANISM_2 | PCI_ALWAYS_EXPOSE_DEV0); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + + pci_register_slot(0x0B, PCI_CARD_SCSI, 4, 1, 2, 3); + 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(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); + + device_add(&ali1435_device); + device_add(&sst_flash_29ee010_device); + + device_add(&kbc_ps2_ami_device); + + return ret; +} + +int +machine_at_tg486gp_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tg486gp/tg486gp.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + + device_add(&ali1429g_device); + + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); + + pci_init(FLAG_MECHANISM_1 | FLAG_MECHANISM_2 | PCI_ALWAYS_EXPOSE_DEV0); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + + pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); + + device_add(&ali1435_device); + device_add(&sst_flash_29ee010_device); + + device_add(&kbc_ps2_tg_ami_device); + + return ret; +} + +/* ALi M1489 */ +int +machine_at_sbc490_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/sbc490/07159589.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(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x01, PCI_CARD_VIDEO, 4, 1, 2, 3); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&ali1489_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&kbc_ps2_ami_device); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_abpb4_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/abpb4/486-AB-PB4.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CAN_SWITCH_TYPE); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + 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); + + device_add(&ali1489_device); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); + device_add(&kbc_at_device); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_arb1476_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/arb1476/w1476b.v21", + 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); + + device_add(&ali1489_device); + device_add_params(&fdc37c669_device, (void *) 0); + device_add(&kbc_ps2_device); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_win486pci_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/win486pci/v1hj3.BIN", + 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(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); + + device_add(&ali1489_device); + device_add_params(&gm82c803ab_device, (void *) GM82C803B); + device_add(&kbc_at_ami_device); + + return ret; +} + +int +machine_at_tf486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tf486/tf486v10.BIN", + 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(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + + device_add(&ali1489_device); + device_add(&kbc_at_phoenix_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_NO_NVR)); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_ms4145_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ms4145/AG56S.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(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(&ali1489_device); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); + device_add(&kbc_at_ami_device); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +/* OPTi 802G */ +static void +machine_at_pc330_6573_common_init(const machine_t *model) +{ + machine_at_common_init_ex(model, 2); + device_add(&ide_vlb_2ch_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 5, 6, 7, 8); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 9, 10, 11, 12); + /* This is a guess because the BIOS always gives it a video BIOS + and never gives it an IRQ, so it is impossible to known for + certain until we obtain PCI readouts from the real machine. */ + pci_register_slot(0x0E, PCI_CARD_VIDEO, 13, 14, 15, 16); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&opti602_device); + device_add(&opti802g_device); + device_add(&opti822_device); + device_add(&kbc_ps2_ami_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + device_add(&ide_opti611_vlb_device); + device_add(&intel_flash_bxt_device); +} + +int +machine_at_aptiva510_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/aptiva510/$IMAGES.USF", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_pc330_6573_common_init(model); + + return ret; +} + +int +machine_at_pc330_6573_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc330_6573/$IMAGES.USF", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_pc330_6573_common_init(model); + + return ret; +} + +/* OPTi 895 */ +static const device_config_t pb450_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "pb450a", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "PhoenixBIOS 4.03 - Revision PCI 1.0A", .internal_name = "pb450a_pci10a" /*"pci10a"*/, .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/OPTI802.bin", "" } }, + { .name = "PhoenixBIOS 4.03 - Revision PNP 1.1A", .internal_name = "pb450a", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/PNP11A.bin", "" } }, + { .name = "PhoenixBIOS 4.05 - Revision P4HS20 (by Micro Firmware)", .internal_name = "pb450a_p4hs20", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/p4hs20.bin", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t pb450_device = { + .name = "Packard Bell PB450", + .internal_name = "pb450_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = pb450_config +}; + +int +machine_at_pb450_init(const machine_t *model) +{ + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add(&ide_vlb_2ch_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 5, 6, 7, 8); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&opti895_device); + device_add(&opti602_device); + device_add(&opti822_device); + device_add(&kbc_ps2_phoenix_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + device_add(&ide_opti611_vlb_device); + device_add(&intel_flash_bxt_device); + device_add(&phoenix_486_jumper_pci_device); + + return ret; +} + +/* i420EX */ +int +machine_at_486pi_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486pi/486pi.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 2, 1); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 1, 2); + + device_add(&kbc_ps2_ami_pci_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&i420ex_device); + + return ret; +} + +int +machine_at_bat4ip3e_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/bat4ip3e/404C.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_IDE, 0xfe, 0xff, 0, 0); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 1, 2); + pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 1, 2, 1); + pci_register_slot(0x0a, PCI_CARD_NORMAL, 1, 2, 1, 2); + + device_add(&phoenix_486_jumper_pci_device); + device_add(&kbc_ps2_pci_device); + device_add(&i420ex_device); + device_add(&ide_cmd640_pci_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + + return ret; +} + +int +machine_at_486ap4_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486ap4/0205.002", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + /* Excluded: 5, 6, 7, 8 */ + pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 09 = Slot 1 */ + pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 0a = Slot 2 */ + pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 0b = Slot 3 */ + pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 0c = Slot 4 */ + device_add(&kbc_ps2_ami_pci_device); /* Uses the AMIKEY KBC */ + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&i420ex_device); + + return ret; +} + +int +machine_at_ninja_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/ninja/1008AY0_.BIO", + "roms/machines/ninja/1008AY0_.BI1", 0x1c000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add(&amstrad_megapc_nvr_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 2, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 1, 2, 1); + device_add(&kbc_ps2_phoenix_device); + device_add(&intel_flash_bxt_ami_device); + + device_add(&i420ex_device); + device_add_params(&i82091aa_device, (void *) I82091AA_022); + + return ret; +} + +int +machine_at_sb486p_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/sb486p/amiboot.rom", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 2, 1); + + device_add(&kbc_ps2_ami_pci_device); + device_add_params(&i82091aa_device, (void *) I82091AA_022); + device_add(&i420ex_device); + + return ret; +} + +/* i420TX */ +int +machine_at_amis76_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_inverted("roms/machines/s76p/S76P.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + // pci_register_slot(0x01, PCI_CARD_IDE, 1, 2, 3 ,4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&kbc_ps2_ami_pci_device); + device_add(&sio_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_ami_device); + + device_add(&i420tx_device); + // device_add(&ide_cmd640_pci_device); /* is this actually cmd640? is it single channel? */ + device_add(&ide_pci_device); + + return ret; +} + +int +machine_at_486sp3_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486sp3/awsi2737.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&ide_isa_device); + + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4); /* 01 = SCSI */ + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 03 = Slot 1 */ + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */ + pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 06 = Slot 4 */ + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&kbc_at_ami_device); /* Uses the AMIKEY KBC */ + device_add(&sio_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C663 | FDC37C6XX_IDE_PRI)); + device_add(&sst_flash_29ee010_device); + + device_add(&i420tx_device); + device_add(&ncr53c810_onboard_pci_device); + + return ret; +} + +int +machine_at_alfredo_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/alfredo/1010AQ0_.BIO", + "roms/machines/alfredo/1010AQ0_.BI1", 0x1c000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + device_add(&amstrad_megapc_nvr_device); + device_add(&ide_pci_device); + + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&kbc_ps2_phoenix_device); + device_add(&sio_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C663); + device_add(&intel_flash_bxt_ami_device); + + device_add(&i420tx_device); + + return ret; +} + +/* i420ZX */ +int +machine_at_486sp3g_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486sp3g/PCI-I-486SP3G_0306.001 (Beta).bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&ide_isa_device); + + pci_init(PCI_CONFIG_TYPE_2); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4); /* 01 = SCSI */ + pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 06 = Slot 1 */ + pci_register_slot(0x05, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 05 = Slot 2 */ + pci_register_slot(0x04, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 04 = Slot 3 */ + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&kbc_ps2_ami_pci_device); /* Uses the AMIKEY KBC */ + device_add(&sio_zb_device); + device_add_params(&pc873xx_device, (void *) (PC87332 | PCX73XX_IDE_PRI | PCX730X_398)); + device_add(&sst_flash_29ee010_device); + + device_add(&i420zx_device); + device_add(&ncr53c810_onboard_pci_device); + + return ret; +} + +static const device_config_t sb486pv_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "sb486pv", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMI WinBIOS (062594) - Revision 0108", .internal_name = "sb486pv_0108", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/sb486pv/41-0108-062594-SATURN2.rom", "" } }, + { .name = "AMI WinBIOS (062594) - Revision 0301", .internal_name = "sb486pv_0301", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/sb486pv/0301-062594-SATURN2.rom", "" } }, + { .name = "AMIBIOS 6 (071595) - Revision 1301", .internal_name = "sb486pv", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/sb486pv/amiboot.rom", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t sb486pv_device = { + .name = "ICS SB486PV", + .internal_name = "sb486pv_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = sb486pv_config +}; + +int +machine_at_sb486pv_init(const machine_t *model) +{ + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + if (!strcmp(fn, "roms/machines/sb486pv/amiboot.rom")) + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + else + ret = bios_load_linear_inverted(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_2); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0e, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x0f, PCI_CARD_VIDEO, 1, 2, 3, 4); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&kbc_ps2_ami_pci_device); + device_add(&sio_zb_device); + device_add(&ide_rz1000_pci_single_channel_device); + device_add_params(&i82091aa_device, (void *) I82091AA_26E); + if (!strcmp(fn, "roms/machines/sb486pv/amiboot.rom")) + device_add(&intel_flash_bxt_device); + else + device_add(&intel_flash_bxt_ami_device); + + device_add(&i420zx_device); + + return ret; +} + +/* IMS 8848 */ +int +machine_at_pci400cb_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pci400cb/032295.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add(&ami_1994_nvr_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 3, 2, 1); /* 0F = Slot 1 */ + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 0E = Slot 2 */ + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 0D = Slot 3 */ + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 0C = Slot 4 */ + device_add(&kbc_ps2_ami_pci_device); /* Assume AMI Megakey 1993 standalone ('P') + because of the Tekram machine below. */ + + device_add(&ims8848_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* SiS 496 */ +static void +machine_at_sis_85c496_common_init(UNUSED(const machine_t *model)) +{ + device_add(&ide_pci_2ch_device); + + pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); + pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + + pci_set_irq_routing(PCI_INTA, PCI_IRQ_DISABLED); + pci_set_irq_routing(PCI_INTB, PCI_IRQ_DISABLED); + pci_set_irq_routing(PCI_INTC, PCI_IRQ_DISABLED); + pci_set_irq_routing(PCI_INTD, PCI_IRQ_DISABLED); +} + +int +machine_at_acerp3_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/acerp3/Acer Mate 600 P3 BIOS U13 V2.0R02-J3 ACR8DE00-S00-950911-R02-J3.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_device); + pci_register_slot(0x09, PCI_CARD_VIDEO, 0, 0, 0, 0); + pci_register_slot(0x0A, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); + device_add(&kbc_ps2_acer_pci_device); + device_add(&ide_cmd640_pci_legacy_only_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&gd5434_onboard_pci_device); + + device_add(&intel_flash_bxt_device); + + return ret; +} + +int +machine_at_486sp3c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486sp3c/SI4I0306.AWD", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_device); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&kbc_ps2_ami_pci_device); + + device_add(&intel_flash_bxt_device); + + return ret; +} + +int +machine_at_ls486e_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ls486e/LS486E RevC.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_ls486e_device); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&kbc_ps2_ami_pci_device); + + return ret; +} + +int +machine_at_m4li_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/m4li/M4LI.04S", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_device); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&kbc_ps2_pci_device); + + return ret; +} + +int +machine_at_ms4144_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ms4144/ms-4144-1.4.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_ls486e_device); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); + device_add(&kbc_at_ami_device); + + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_r418_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/r418/r418i.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_device); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&kbc_ps2_pci_device); + + return ret; +} + +int +machine_at_4saw2_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/4saw2/4saw0911.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_device); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add_params(&w837x7_device, (void *) (W83777F | W837X7_KEY_89)); + device_add(&kbc_ps2_pci_device); + + device_add(&intel_flash_bxt_device); + + return ret; +} + +int +machine_at_4dps_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/4dps/4DPS172G.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_device); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add_params(&w837x7_device, (void *) (W83787IF | W837X7_KEY_89)); + device_add(&kbc_ps2_ami_device); + + device_add(&intel_flash_bxt_device); + + return ret; +} + +/* UMC 8881 */ +int +machine_at_atc1415_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/atc1415/1415V330.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add(&umc_hb4_device); + device_add(&umc_8886bf_device); + device_add(&intel_flash_bxt_device); + device_add(&kbc_at_ami_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_84xxuuda_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/84xxuuda/uud0520s.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 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); + + device_add(&umc_hb4_device); + device_add(&umc_8886bf_device); + device_add_params(&um866x_device, (void *) UM8663BF); + device_add(&winbond_flash_w29c010_device); + device_add(&kbc_ps2_ami_device); + + return ret; +} + +int +machine_at_pl4600c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pl4600c/SST29EE010.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* Slot 01 */ + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); /* Slot 02 */ + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); /* Onboard */ + pci_register_slot(0x13, PCI_CARD_VIDEO, 0, 0, 0, 0); /* Onboard */ + + + device_add(&umc_hb4_device); + device_add(&umc_8886af_device); + device_add_params(&um866x_device, (void *) UM8663AF); + device_add(&sst_flash_29ee010_device); + device_add(&kbc_ps2_ami_pci_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&gd5430_onboard_pci_device); + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(&ess_1688_device); + + if (fdc_current[0] == FDC_INTERNAL){ + fdd_set_turbo(0, 1); + fdd_set_turbo(1, 1); + } + + return ret; +} + +int +machine_at_ecs486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ecs486/8810AIO.32J", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add(&umc_hb4_device); + device_add(&umc_8886f_device); + device_add(&ide_cmd640_pci_legacy_only_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); + device_add(&kbc_ps2_ami_device); + + return ret; +} + +int +machine_at_actionpc2600_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/actionpc2600/action2600.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 3); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_VIDEO, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add(&umc_hb4_device); + device_add(&umc_8886bf_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); + device_add(&kbc_ps2_tg_ami_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} + +int +machine_at_actiontower8400_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/actiontower8400/V31C.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x15, PCI_CARD_VIDEO, 0, 0, 0, 0); + pci_register_slot(0x16, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x14, PCI_CARD_NORMAL, 2, 3, 4, 1); + + device_add(&umc_hb4_device); + device_add(&umc_8886f_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&ide_cmd640_pci_device); + device_add(&intel_flash_bxt_device); // The ActionPC 2600 has this so I'm gonna assume this does too. + device_add(&kbc_ps2_ami_pci_device); + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} + +int +machine_at_m919_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/m919/9190914s.rom", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add(&umc_hb4_device); + device_add(&umc_8886af_device); /* AF is correct - the BIOS does IDE writes to ports 108h and 109h. */ + device_add_params(&um866x_device, (void *) UM8663BF); + device_add(&sst_flash_29ee010_device); + device_add(&kbc_at_ami_device); + + return ret; +} + +int +machine_at_spc7700plw_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/spc7700plw/77LW13FH.P24", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add(&umc_hb4_device); + device_add(&umc_8886af_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); + device_add(&kbc_ps2_ami_device); + + return ret; +} + +static const device_config_t hot433a_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "hot433a", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMIBIOS 5 (101094) - Revision 433AUS33", .internal_name = "hot433a", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/hot433/433AUS33.ROM", "" } }, + { .name = "AwardBIOS v4.51PG - Revision 2.5 (by eSupport)", .internal_name = "hot433a_v451pg", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/hot433/2A4X5H21.BIN", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t hot433a_device = { + .name = "Shuttle HOT-433A", + .internal_name = "hot433a_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = hot433a_config +}; + +int +machine_at_hot433a_init(const machine_t *model) +{ + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + int is_award = !strcmp(device_get_config_bios("bios"), "hot433a_award"); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + if (is_award) + device_add(&amstrad_megapc_nvr_device); + else + device_add(&ami_1994_nvr_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); + + device_add(&umc_hb4_device); + device_add(&umc_8886bf_device); + if (is_award) + device_add_params(&um866x_device, (void *) UM8663AF); + else + device_add_params(&um8669f_device, (void *) 0); + device_add(&winbond_flash_w29c010_device); + if (is_award) + device_add(&kbc_ps2_ami_device); + else + device_add(&kbc_at_ami_device); + + pic_toggle_latch(is_award); + + return ret; +} + +/* VIA VT82C496G */ +int +machine_at_g486vpa_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/g486vpa/3.BIN", + 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); + + device_add(&via_vt82c49x_pci_ide_device); + device_add(&via_vt82c505_device); + device_add_params(&pc873xx_device, (void *) (PC87332 | PCX73XX_IDE_SEC | PCX730X_398)); + device_add(&kbc_ps2_ami_pci_device); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_486vipio2_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486vipio2/1175G701.BIN", + 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); + + device_add(&via_vt82c49x_pci_ide_device); + device_add(&via_vt82c505_device); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); + device_add(&kbc_ps2_ami_pci_device); + device_add(&winbond_flash_w29c010_device); + + return ret; +} diff --git a/src/machine/m_at_socket4.c b/src/machine/m_at_socket4.c index 6fd66bae6..c46c537a0 100644 --- a/src/machine/m_at_socket4.c +++ b/src/machine/m_at_socket4.c @@ -8,11 +8,9 @@ * * Implementation of Socket 4 machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -41,41 +39,7 @@ #include <86box/video.h> #include <86box/machine.h> -int -machine_at_v12p_init(const machine_t *model) - -{ - int ret = 0; - const char* fn; - - /* No ROMs available */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - machine_at_common_init(model); - - device_add(&ide_isa_device); - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SCSI, 1, 4, 3, 2); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 2, 1, 4, 3); - pci_register_slot(0x03, PCI_CARD_NORMAL, 3, 2, 1, 4); - pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 0, 0, 0); - pci_register_slot(0x05, PCI_CARD_NORMAL, 0, 0, 0, 0); - device_add(&i430lx_device); - device_add(&kbc_ps2_acer_pci_device); - device_add(&sio_zb_device); - device_add_params(&pc87310_device, (void *) (PC87310_ALI)); - device_add(&amd_am28f010_flash_device); - - return ret; -} - +/* i430LX */ static const device_config_t v12p_config[] = { // clang-format off { @@ -112,15 +76,58 @@ const device_t v12p_device = { .config = v12p_config }; -void -machine_at_premiere_common_init(const machine_t *model, int pci_switch) +int +machine_at_v12p_init(const machine_t *model) { + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + machine_at_common_init(model); + + device_add(&ide_isa_device); + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SCSI, 1, 4, 3, 2); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 2, 1, 4, 3); + pci_register_slot(0x03, PCI_CARD_NORMAL, 3, 2, 1, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 0, 0, 0); + pci_register_slot(0x05, PCI_CARD_NORMAL, 0, 0, 0, 0); + device_add(&i430lx_device); + device_add(&kbc_ps2_acer_pci_device); + device_add(&sio_zb_device); + device_add_params(&pc87310_device, (void *) (PC87310_ALI)); + device_add(&amd_am28f010_flash_device); + + return ret; +} + +int +machine_at_ambradp60_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/ambradp60/1004AF1P.BIO", + "roms/machines/ambradp60/1004AF1P.BI1", + 0x1c000, 128); + + if (bios_only || !ret) + return ret; + machine_at_common_init_ex(model, 2); device_add(&amstrad_megapc_nvr_device); - device_add(&ide_pci_2ch_device); + device_add(&ide_pci_device); - pci_init(PCI_CONFIG_TYPE_2 | pci_switch); + pci_init(PCI_CONFIG_TYPE_2); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); @@ -129,32 +136,12 @@ machine_at_premiere_common_init(const machine_t *model, int pci_switch) pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); device_add(&kbc_ps2_phoenix_device); device_add(&sio_zb_device); - device_add(&ide_rz1000_pci_single_channel_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); device_add(&intel_flash_bxt_ami_device); -} -void -machine_at_sp4_common_init(const machine_t *model) -{ - machine_at_common_init(model); + device_add(&i430lx_device); - 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); - /* Excluded: 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F, 10, 11, 12, 13, 14 */ - pci_register_slot(0x0D, PCI_CARD_IDE, 1, 2, 3, 4); - /* Excluded: 02, 03*, 04*, 05*, 06*, 07*, 08* */ - /* Slots: 09 (04), 0A (03), 0B (02), 0C (07) */ - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - device_add(&sis_85c50x_device); - device_add(&ide_cmd640_pci_device); - device_add(&kbc_ps2_ami_pci_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&intel_flash_bxt_device); + return ret; } int @@ -210,9 +197,9 @@ machine_at_p5mp3_init(const machine_t *model) device_add(&fdc_at_device); device_add(&kbc_ps2_pci_device); + device_add(&i430lx_device); device_add(&sio_zb_device); device_add(&catalyst_flash_device); - device_add(&i430lx_device); return ret; } @@ -282,34 +269,40 @@ machine_at_opti560l_init(const machine_t *model) return ret; } +void +machine_at_award_common_init(const machine_t *model) +{ + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 03 = Slot 1 */ + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */ + pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 06 = Slot 4 */ + pci_register_slot(0x07, PCI_CARD_SCSI, 1, 2, 3, 4); /* 07 = SCSI */ + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&kbc_at_ami_device); + device_add(&sio_zb_device); + device_add(&intel_flash_bxt_device); +} + int -machine_at_ambradp60_init(const machine_t *model) +machine_at_586is_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined("roms/machines/ambradp60/1004AF1P.BIO", - "roms/machines/ambradp60/1004AF1P.BI1", - 0x1c000, 128); + ret = bios_load_linear("roms/machines/586is/IS.34", + 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; - machine_at_common_init_ex(model, 2); - - device_add(&amstrad_megapc_nvr_device); - device_add(&ide_pci_device); - - pci_init(PCI_CONFIG_TYPE_2); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&kbc_ps2_phoenix_device); - device_add(&sio_zb_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); - device_add(&intel_flash_bxt_ami_device); + machine_at_award_common_init(model); device_add(&i430lx_device); @@ -352,6 +345,28 @@ machine_at_valuepointp60_init(const machine_t *model) return ret; } +void +machine_at_premiere_common_init(const machine_t *model, int pci_switch) +{ + machine_at_common_init_ex(model, 2); + + device_add(&amstrad_megapc_nvr_device); + device_add(&ide_pci_2ch_device); + + pci_init(PCI_CONFIG_TYPE_2 | pci_switch); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&kbc_ps2_phoenix_device); + device_add(&sio_zb_device); + device_add(&ide_rz1000_pci_single_channel_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + device_add(&intel_flash_bxt_ami_device); +} + int machine_at_revenge_init(const machine_t *model) { @@ -371,42 +386,32 @@ machine_at_revenge_init(const machine_t *model) return ret; } -void -machine_at_award_common_init(const machine_t *model) -{ - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 03 = Slot 1 */ - pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ - pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */ - pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 06 = Slot 4 */ - pci_register_slot(0x07, PCI_CARD_SCSI, 1, 2, 3, 4); /* 07 = SCSI */ - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&kbc_at_ami_device); - device_add(&sio_zb_device); - device_add(&intel_flash_bxt_device); -} - int -machine_at_586is_init(const machine_t *model) +machine_at_m5pi_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/586is/IS.34", + ret = bios_load_linear_inverted("roms/machines/m5pi/M5PI10R.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; - machine_at_award_common_init(model); + machine_at_common_init(model); - device_add(&i430lx_device); + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x0f, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0c, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i430lx_device); + device_add(&sio_zb_device); + device_add(&kbc_ps2_phoenix_device); + device_add(&ide_w83769f_pci_single_channel_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + device_add(&intel_flash_bxt_ami_device); return ret; } @@ -447,32 +452,24 @@ machine_at_pb520r_init(const machine_t *model) return ret; } +/* OPTi 597 */ int -machine_at_m5pi_init(const machine_t *model) +machine_at_excalibur_init(const machine_t *model) { int ret; - ret = bios_load_linear_inverted("roms/machines/m5pi/M5PI10R.BIN", - 0x000e0000, 131072, 0); + ret = bios_load_linear_inverted("roms/machines/excalibur/S75P.ROM", + 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; machine_at_common_init(model); - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x0f, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0c, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i430lx_device); - device_add(&sio_zb_device); - device_add(&kbc_ps2_phoenix_device); - device_add(&ide_w83769f_pci_single_channel_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); - device_add(&intel_flash_bxt_ami_device); + device_add(&opti5x7_device); + device_add(&ide_opti611_vlb_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C661); + device_add(&kbc_ps2_intel_ami_pci_device); return ret; } @@ -508,27 +505,6 @@ machine_at_globalyst330_p5_init(const machine_t *model) return ret; } -int -machine_at_excalibur_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_inverted("roms/machines/excalibur/S75P.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&opti5x7_device); - device_add(&ide_opti611_vlb_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C661); - device_add(&kbc_ps2_intel_ami_pci_device); - - return ret; -} - int machine_at_p5vl_init(const machine_t *model) { @@ -561,6 +537,7 @@ machine_at_p5vl_init(const machine_t *model) return ret; } +/* SiS 501 */ int machine_at_excaliburpci2_init(const machine_t *model) { @@ -593,6 +570,29 @@ machine_at_excaliburpci2_init(const machine_t *model) return ret; } +void +machine_at_sp4_common_init(const machine_t *model) +{ + machine_at_common_init(model); + + 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); + /* Excluded: 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F, 10, 11, 12, 13, 14 */ + pci_register_slot(0x0D, PCI_CARD_IDE, 1, 2, 3, 4); + /* Excluded: 02, 03*, 04*, 05*, 06*, 07*, 08* */ + /* Slots: 09 (04), 0A (03), 0B (02), 0C (07) */ + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&sis_85c50x_device); + device_add(&ide_cmd640_pci_device); + device_add(&kbc_ps2_ami_pci_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); +} + int machine_at_p5sp4_init(const machine_t *model) { diff --git a/src/machine/m_at_socket5.c b/src/machine/m_at_socket5.c index 01812ffe7..bb13c58a6 100644 --- a/src/machine/m_at_socket5.c +++ b/src/machine/m_at_socket5.c @@ -8,11 +8,9 @@ * * Implementation of Socket 5 machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -42,123 +40,7 @@ #include <86box/machine.h> #include <86box/sound.h> -int -machine_at_plato_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/plato/1016ax1_.bio", - "roms/machines/plato/1016ax1_.bi1", - 0x1d000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE); - - device_add(&i430nx_device); - - return ret; -} - -int -machine_at_dellplato_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/dellplato/1016AX1J.BIO", - "roms/machines/dellplato/1016AX1J.BI1", - 0x1d000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE); - - device_add(&i430nx_device); - - return ret; -} - -int -machine_at_d842_init(const machine_t *model) - -{ - int ret = 0; - const char* fn; - - /* No ROMs available */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - machine_at_common_init(model); - - device_add(&ide_pci_2ch_device); - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); /* Onboard */ - pci_register_slot(0x03, PCI_CARD_VIDEO, 4, 0, 0, 0); /* Onboard */ - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); /* Slot 01 */ - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); /* Slot 02 */ - - device_add(&kbc_ps2_pci_device); - device_add(&i430nx_device); - device_add(&sio_zb_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&intel_flash_bxt_device); - - return ret; -} - -static const device_config_t d842_config[] = { - // clang-format off - { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, - .default_string = "d842", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, /*W1*/ - .bios = { - { .name = "PhoenixBIOS Pentium 1.03 - Revision 1.03.842", .internal_name = "d842_103", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842.BIN", "" } }, - { .name = "PhoenixBIOS Pentium 1.03 - Revision 1.09.842", .internal_name = "d842_109", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_jul96.bin", "" } }, - { .name = "PhoenixBIOS Pentium 1.03 - Revision 1.10.842", .internal_name = "d842", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_jun98_1.bin", "" } }, - { .name = "PhoenixBIOS 4.04 - Revision 1.05.842", .internal_name = "d842_105", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_mar96.bin", "" } }, - { .name = "PhoenixBIOS 4.04 - Revision 1.06.842", .internal_name = "d842_106", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_apr98.bin", "" } }, - { .name = "PhoenixBIOS 4.04 - Revision 1.07.842", .internal_name = "d842_107", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_jun98.BIN", "" } }, - { .files_no = 0 } - }, - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t d842_device = { - .name = "Siemens-Nixdorf D842", - .internal_name = "d842_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = d842_config -}; - +/* i430NX */ int machine_at_ambradp90_init(const machine_t *model) { @@ -208,6 +90,25 @@ machine_at_p54np4_init(const machine_t *model) return ret; } +int +machine_at_dellplato_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/dellplato/1016AX1J.BIO", + "roms/machines/dellplato/1016AX1J.BI1", + 0x1d000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE); + + device_add(&i430nx_device); + + return ret; +} + int machine_at_586ip_init(const machine_t *model) { @@ -226,6 +127,103 @@ machine_at_586ip_init(const machine_t *model) return ret; } +int +machine_at_plato_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/plato/1016ax1_.bio", + "roms/machines/plato/1016ax1_.bi1", + 0x1d000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE); + + device_add(&i430nx_device); + + return ret; +} + +static const device_config_t d842_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "d842", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, /*W1*/ + .bios = { + { .name = "PhoenixBIOS Pentium 1.03 - Revision 1.03.842", .internal_name = "d842_103", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842.BIN", "" } }, + { .name = "PhoenixBIOS Pentium 1.03 - Revision 1.09.842", .internal_name = "d842_109", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_jul96.bin", "" } }, + { .name = "PhoenixBIOS Pentium 1.03 - Revision 1.10.842", .internal_name = "d842", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_jun98_1.bin", "" } }, + { .name = "PhoenixBIOS 4.04 - Revision 1.05.842", .internal_name = "d842_105", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_mar96.bin", "" } }, + { .name = "PhoenixBIOS 4.04 - Revision 1.06.842", .internal_name = "d842_106", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_apr98.bin", "" } }, + { .name = "PhoenixBIOS 4.04 - Revision 1.07.842", .internal_name = "d842_107", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_jun98.BIN", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t d842_device = { + .name = "Siemens-Nixdorf D842", + .internal_name = "d842_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = d842_config +}; + +int +machine_at_d842_init(const machine_t *model) +{ + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + machine_at_common_init(model); + + device_add(&ide_pci_2ch_device); + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); /* Onboard */ + pci_register_slot(0x03, PCI_CARD_VIDEO, 4, 0, 0, 0); /* Onboard */ + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); /* Slot 01 */ + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); /* Slot 02 */ + + device_add(&kbc_ps2_pci_device); + device_add(&i430nx_device); + device_add(&sio_zb_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); + + return ret; +} + int machine_at_tek932_init(const machine_t *model) { @@ -256,6 +254,7 @@ machine_at_tek932_init(const machine_t *model) return ret; } +/* i430FX */ int machine_at_acerv30_init(const machine_t *model) { @@ -386,6 +385,36 @@ machine_at_zappa_gpio_init(void) machine_set_gpio_default(gpio); } +int +machine_at_pt2000_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ficpt2000/PT2000_v1.01.BIN", + 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, 0, 0, 0, 0); + /* Should be VIA, but we do not emulate that yet. */ + device_add(&kbc_ps2_holtek_device); + device_add(&i430fx_device); + device_add(&piix_device); + device_add_params(&pc873xx_device, (void *) (PC87332 | PCX730X_398)); + device_add(&intel_flash_bxt_device); + + return ret; +} + int machine_at_zappa_init(const machine_t *model) { @@ -472,13 +501,13 @@ machine_at_hawk_init(const machine_t *model) return ret; } - +/* OPTi 597 */ int -machine_at_pt2000_init(const machine_t *model) +machine_at_ncselp90_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/ficpt2000/PT2000_v1.01.BIN", + ret = bios_load_linear("roms/machines/ncselp90/elegancep90.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -487,40 +516,18 @@ machine_at_pt2000_init(const machine_t *model) 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, 0, 0, 0, 0); - /* Should be VIA, but we do not emulate that yet. */ - device_add(&kbc_ps2_holtek_device); - device_add(&i430fx_device); - device_add(&piix_device); - device_add_params(&pc873xx_device, (void *) (PC87332 | PCX730X_398)); - device_add(&intel_flash_bxt_device); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); - return ret; -} - -int -machine_at_pat54pv_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pat54pv/PAT54PV.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&opti5x7_device); - device_add(&kbc_ps2_intel_ami_pci_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); + device_add(&opti5x7_pci_device); + device_add(&opti822_device); + device_add(&sst_flash_29ee010_device); + device_add(&kbc_ps2_ami_pci_device); + device_add(&ide_opti611_vlb_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + device_add(&ide_vlb_2ch_device); return ret; } @@ -556,35 +563,28 @@ machine_at_hot543_init(const machine_t *model) } int -machine_at_ncselp90_init(const machine_t *model) +machine_at_pat54pv_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/ncselp90/elegancep90.bin", - 0x000e0000, 131072, 0); + ret = bios_load_linear("roms/machines/pat54pv/PAT54PV.bin", + 0x000f0000, 65536, 0); if (bios_only || !ret) return ret; machine_at_common_init(model); - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); + device_add(&opti5x7_device); + device_add(&kbc_ps2_intel_ami_pci_device); - device_add(&opti5x7_pci_device); - device_add(&opti822_device); - device_add(&sst_flash_29ee010_device); - device_add(&kbc_ps2_ami_pci_device); - device_add(&ide_opti611_vlb_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); - device_add(&ide_vlb_2ch_device); + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); return ret; } +/* SiS 501 */ int machine_at_p54sp4_init(const machine_t *model) { @@ -692,6 +692,7 @@ machine_at_ms5109_init(const machine_t *model) return ret; } +/* SiS 5501 */ int machine_at_torino_init(const machine_t *model) { @@ -726,6 +727,7 @@ machine_at_torino_init(const machine_t *model) return ret; } +/* UMC 889x */ int machine_at_hot539_init(const machine_t *model) { diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index 18a496581..1c9dc6a0e 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -8,12 +8,9 @@ * * Implementation of Socket 7 (Dual Voltage) machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2020 Miran Grca. - * + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -46,21 +43,13 @@ #include <86box/network.h> #include <86box/pci.h> -void -machine_at_optiplex_21152_init(void) -{ - uint8_t bus_index = pci_bridge_get_bus_index(device_add(&dec21152_device)); - pci_register_bus_slot(bus_index, 0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_bus_slot(bus_index, 0x0a, PCI_CARD_NORMAL, 4, 2, 1, 3); - pci_register_bus_slot(bus_index, 0x0b, PCI_CARD_NORMAL, 1, 3, 4, 2); -} - +/* i430HX */ int -machine_at_acerv35n_init(const machine_t *model) +machine_at_acerm3a_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/acerv35n/v35nd1s1.bin", + ret = bios_load_linear("roms/machines/acerm3a/r01-b3.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -71,54 +60,20 @@ machine_at_acerv35n_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x10, PCI_CARD_VIDEO, 4, 0, 0, 0); device_add(&i430hx_device); device_add(&piix3_device); - /* The chip is not marked FR but the BIOS accesses register 06h of GPIO. */ - device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_FR)); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL)); + device_add(&sst_flash_29ee010_device); return ret; } -int -machine_at_ap5vm_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ap5vm/AP5V270.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); - /* It seems there were plans for an on-board NCR 53C810 according to some clues - left in the manual, but were latter scrapped. The BIOS still support that - PCI device, though, so why not. */ - pci_register_slot(0x06, PCI_CARD_SCSI, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i430vx_device); - device_add(&piix3_device); - device_add(&kbc_ps2_ami_pci_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&ncr53c810_onboard_pci_device); - device_add(&intel_flash_bxt_device); - - return ret; -} - int machine_at_p55t2p4_init(const machine_t *model) { @@ -148,142 +103,39 @@ machine_at_p55t2p4_init(const machine_t *model) return ret; } +void +machine_at_p65up5_common_init(const machine_t *model, const device_t *northbridge) +{ + 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(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(northbridge); + device_add(&piix3_ioapic_device); + device_add(&kbc_ps2_ami_pci_device); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); + device_add(&sst_flash_29ee010_device); + device_add(&ioapic_device); +} + int -machine_at_m7shi_init(const machine_t *model) +machine_at_p65up5_cp55t2d_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/m7shi/m7shi2n.rom", - 0x000c0000, 262144, 0); + ret = bios_load_linear("roms/machines/p65up5/TD5I0201.AWD", + 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(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - device_add(&i430hx_device); - device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL)); - device_add(&intel_flash_bxt_device); - - return ret; -} - -/* The Sony VAIO is an AG430HX, I'm assuming it has the same configuration bits - as the TC430HX, hence the #define. */ -#define machine_at_ag430hx_gpio_init machine_at_tc430hx_gpio_init - -/* The PB680 is a NV430VX, I'm assuming it has the same configuration bits as - the TC430HX, hence the #define. */ -#define machine_at_nv430vx_gpio_init machine_at_tc430hx_gpio_init - -static void -machine_at_tc430hx_gpio_init(void) -{ - uint32_t gpio = 0xffffe1ff; - - /* Register 0x0079: */ - /* Bit 7: 0 = Clear password, 1 = Keep password. */ - /* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */ - /* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */ - /* Bit 4: External CPU clock (Switch 8). */ - /* Bit 3: External CPU clock (Switch 7). */ - /* 50 MHz: Switch 7 = Off, Switch 8 = Off. */ - /* 60 MHz: Switch 7 = On, Switch 8 = Off. */ - /* 66 MHz: Switch 7 = Off, Switch 8 = On. */ - /* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */ - /* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */ - /* Bit 0: 0 = Reserved. */ - /* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */ - if (cpu_busspeed <= 50000000) - gpio |= 0xffff10ff; - else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000)) - gpio |= 0xffff18ff; - else if (cpu_busspeed > 60000000) - gpio |= 0xffff00ff; - - machine_set_gpio_default(gpio); -} - -int -machine_at_tc430hx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/tc430hx/1007DH0_.BIO", - "roms/machines/tc430hx/1007DH0_.BI1", - "roms/machines/tc430hx/1007DH0_.BI2", - "roms/machines/tc430hx/1007DH0_.BI3", - "roms/machines/tc430hx/1007DH0_.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - machine_at_tc430hx_gpio_init(); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&i430hx_device); - device_add(&piix3_device); - device_add_params(&pc87306_device, (void *) PCX730X_AMI); - device_add(&intel_flash_bxt_ami_device); - - return ret; -} - -int -machine_at_infinia7200_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/infinia7200/1008DH08.BIO", - "roms/machines/infinia7200/1008DH08.BI1", - "roms/machines/infinia7200/1008DH08.BI2", - "roms/machines/infinia7200/1008DH08.BI3", - "roms/machines/infinia7200/1008DH08.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - machine_at_tc430hx_gpio_init(); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&i430hx_device); - device_add(&piix3_device); - device_add_params(&pc87306_device, (void *) PCX730X_AMI); - device_add(&intel_flash_bxt_ami_device); + machine_at_p65up5_common_init(model, &i430hx_device); return ret; } @@ -364,33 +216,79 @@ machine_at_cu430hx_init(const machine_t *model) return ret; } +static void +machine_at_tc430hx_gpio_init(void) +{ + uint32_t gpio = 0xffffe1ff; + + /* Register 0x0079: */ + /* Bit 7: 0 = Clear password, 1 = Keep password. */ + /* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */ + /* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */ + /* Bit 4: External CPU clock (Switch 8). */ + /* Bit 3: External CPU clock (Switch 7). */ + /* 50 MHz: Switch 7 = Off, Switch 8 = Off. */ + /* 60 MHz: Switch 7 = On, Switch 8 = Off. */ + /* 66 MHz: Switch 7 = Off, Switch 8 = On. */ + /* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */ + /* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */ + /* Bit 0: 0 = Reserved. */ + /* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */ + if (cpu_busspeed <= 50000000) + gpio |= 0xffff10ff; + else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000)) + gpio |= 0xffff18ff; + else if (cpu_busspeed > 60000000) + gpio |= 0xffff00ff; + + machine_set_gpio_default(gpio); +} + int -machine_at_equium5200_init(const machine_t *model) +machine_at_tc430hx_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined2("roms/machines/equium5200/1003DK08.BIO", - "roms/machines/equium5200/1003DK08.BI1", - "roms/machines/equium5200/1003DK08.BI2", - "roms/machines/equium5200/1003DK08.BI3", - "roms/machines/equium5200/1003DK08.RCV", + ret = bios_load_linear_combined2("roms/machines/tc430hx/1007DH0_.BIO", + "roms/machines/tc430hx/1007DH0_.BI1", + "roms/machines/tc430hx/1007DH0_.BI2", + "roms/machines/tc430hx/1007DH0_.BI3", + "roms/machines/tc430hx/1007DH0_.RCV", 0x3a000, 128); if (bios_only || !ret) return ret; - machine_at_cu430hx_common_init(model); + machine_at_common_init_ex(model, 2); + machine_at_tc430hx_gpio_init(); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&i430hx_device); + device_add(&piix3_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); + device_add(&intel_flash_bxt_ami_device); return ret; } int -machine_at_p55t2s_init(const machine_t *model) +machine_at_m7shi_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/p55t2s/s6y08t.rom", - 0x000e0000, 131072, 0); + ret = bios_load_linear("roms/machines/m7shi/m7shi2n.rom", + 0x000c0000, 262144, 0); if (bios_only || !ret) return ret; @@ -398,20 +296,55 @@ machine_at_p55t2s_init(const machine_t *model) 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(0x12, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); device_add(&i430hx_device); device_add(&piix3_device); - device_add_params(&pc87306_device, (void *) PCX730X_AMI); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL)); device_add(&intel_flash_bxt_device); return ret; } +int +machine_at_epc2102_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/epc2102/P5000HX.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add_params(&at_nvr_device, (void *) 0x20); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i430hx_device); + device_add(&piix3_device); + device_add(&kbc_ps2_intel_ami_pci_device); + device_add_params(&i82091aa_device, (void *) I82091AA_022); + device_add(&radisys_config_device); + device_add(&sst_flash_39sf010_device); + + return ret; +} + +/* The Sony VAIO is an AG430HX, I'm assuming it has the same configuration bits + as the TC430HX, hence the #define. */ +#define machine_at_ag430hx_gpio_init machine_at_tc430hx_gpio_init + int machine_at_pcv90_init(const machine_t *model) { @@ -447,48 +380,122 @@ machine_at_pcv90_init(const machine_t *model) } int -machine_at_p65up5_cp55t2d_init(const machine_t *model) +machine_at_p55t2s_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/p65up5/TD5I0201.AWD", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_p65up5_common_init(model, &i430hx_device); - - return ret; -} - -int -machine_at_epc2102_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/epc2102/P5000HX.ROM", + ret = bios_load_linear("roms/machines/p55t2s/s6y08t.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; machine_at_common_init_ex(model, 2); - device_add_params(&at_nvr_device, (void *) 0x20); pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); device_add(&i430hx_device); device_add(&piix3_device); - device_add(&kbc_ps2_intel_ami_pci_device); - device_add_params(&i82091aa_device, (void *) I82091AA_022); - device_add(&radisys_config_device); - device_add(&sst_flash_39sf010_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); + device_add(&intel_flash_bxt_device); + + return ret; +} + +int +machine_at_equium5200_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined2("roms/machines/equium5200/1003DK08.BIO", + "roms/machines/equium5200/1003DK08.BI1", + "roms/machines/equium5200/1003DK08.BI2", + "roms/machines/equium5200/1003DK08.BI3", + "roms/machines/equium5200/1003DK08.RCV", + 0x3a000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_cu430hx_common_init(model); + + return ret; +} + +int +machine_at_infinia7200_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined2("roms/machines/infinia7200/1008DH08.BIO", + "roms/machines/infinia7200/1008DH08.BI1", + "roms/machines/infinia7200/1008DH08.BI2", + "roms/machines/infinia7200/1008DH08.BI3", + "roms/machines/infinia7200/1008DH08.RCV", + 0x3a000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + machine_at_tc430hx_gpio_init(); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&i430hx_device); + device_add(&piix3_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); + device_add(&intel_flash_bxt_ami_device); + + return ret; +} + +/* i430VX */ +int +machine_at_ap5vm_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ap5vm/AP5V270.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); + /* It seems there were plans for an on-board NCR 53C810 according to some clues + left in the manual, but were latter scrapped. The BIOS still support that + PCI device, though, so why not. */ + pci_register_slot(0x06, PCI_CARD_SCSI, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i430vx_device); + device_add(&piix3_device); + device_add(&kbc_ps2_ami_pci_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&ncr53c810_onboard_pci_device); + device_add(&intel_flash_bxt_device); return ret; } @@ -729,6 +736,43 @@ machine_at_p55va_init(const machine_t *model) return ret; } +int +machine_at_gw2kte_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined2("roms/machines/gw2kte/1008CY1T.BIO", + "roms/machines/gw2kte/1008CY1T.BI1", + "roms/machines/gw2kte/1008CY1T.BI2", + "roms/machines/gw2kte/1008CY1T.BI3", + "roms/machines/gw2kte/1008CY1T.RCV", + 0x3a000, 128); + + 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(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 4); + + if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)->available()) + machine_snd = device_add(machine_get_snd_device(machine)); + + device_add(&i430vx_device); + device_add(&piix3_device); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_FR)); + device_add(&intel_flash_bxt_ami_device); + + return ret; +} + int machine_at_brio80xx_init(const machine_t *model) { @@ -757,6 +801,10 @@ machine_at_brio80xx_init(const machine_t *model) return ret; } +/* The PB680 is a NV430VX, I'm assuming it has the same configuration bits as + the TC430HX, hence the #define. */ +#define machine_at_nv430vx_gpio_init machine_at_tc430hx_gpio_init + int machine_at_pb680_init(const machine_t *model) { @@ -883,73 +931,7 @@ machine_at_i430vx_init(const machine_t *model) return ret; } -int -machine_at_gw2kte_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/gw2kte/1008CY1T.BIO", - "roms/machines/gw2kte/1008CY1T.BI1", - "roms/machines/gw2kte/1008CY1T.BI2", - "roms/machines/gw2kte/1008CY1T.BI3", - "roms/machines/gw2kte/1008CY1T.RCV", - 0x3a000, 128); - - 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(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 4); - - if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)->available()) - machine_snd = device_add(machine_get_snd_device(machine)); - - device_add(&i430vx_device); - device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_FR)); - device_add(&intel_flash_bxt_ami_device); - - return ret; -} - -int -machine_at_ma23c_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ma23c/BIOS.ROM", - 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(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_VIDEO, 3, 4, 1, 2); - device_add(&i430tx_device); - device_add(&piix4_device); - device_add(&nec_mate_unk_device); - device_add_params(&fdc37c67x_device, (void *) (FDC37XXX2 | FDC37XXXX_370)); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - - return ret; -} - +/* i430TX */ int machine_at_nupro592_init(const machine_t *model) { @@ -1029,6 +1011,15 @@ machine_at_tx97_init(const machine_t *model) return ret; } +void +machine_at_optiplex_21152_init(void) +{ + uint8_t bus_index = pci_bridge_get_bus_index(device_add(&dec21152_device)); + pci_register_bus_slot(bus_index, 0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_bus_slot(bus_index, 0x0a, PCI_CARD_NORMAL, 4, 2, 1, 3); + pci_register_bus_slot(bus_index, 0x0b, PCI_CARD_NORMAL, 1, 3, 4, 2); +} + int machine_at_optiplexgn_init(const machine_t *model) { @@ -1067,6 +1058,137 @@ machine_at_optiplexgn_init(const machine_t *model) return ret; } +int +machine_at_tomahawk_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tomahawk/0AAGT046.ROM", + 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(0x0F, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ + pci_register_slot(0x0D, PCI_CARD_VIDEO, 3, 0, 0, 0); + pci_register_slot(0x0E, PCI_CARD_NETWORK, 4, 0, 0, 0); + pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); + device_add(&i430tx_device); + device_add(&piix4_device); + device_add_params(&fdc37c67x_device, (void *) (FDC37XXX2 | FDC37XXXX_370)); + device_add(&amd_flash_29f020a_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 128); + device_add(&lm78_device); /* fans: Thermal, CPU, Chassis; temperature: unused */ + device_add(&lm75_1_4a_device); /* temperature: CPU */ + + if ((gfxcard[0] == VID_INTERNAL) && machine_get_vid_device(machine)) + device_add(machine_get_vid_device(machine)); + + if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)) + device_add(machine_get_snd_device(machine)); + + if ((net_cards_conf[0].device_num == NET_INTERNAL) && machine_get_net_device(machine)) + device_add(machine_get_net_device(machine)); + + return ret; +} + +int +machine_at_ym430tx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ym430tx/YM430TX.003", + 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, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); + device_add(&i430tx_device); + device_add(&piix4_device); + device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 128); + + return ret; +} + +int +machine_at_thunderbolt_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/thunderbolt/tbolt-01.rom", + 0x000c0000, 262144, 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(0x07, PCI_CARD_SOUTHBRIDGE, 0, 1, 2, 3); /* PIIX4 */ + pci_register_slot(0x11, PCI_CARD_NORMAL, 0, 1, 2, 3); + pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 3, 0); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 0, 1); + pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 0, 1, 2); + device_add(&i430tx_device); + device_add(&piix4_device); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL | FDC37C93X_NO_NVR)); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 128); + + return ret; +} + +int +machine_at_ma23c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ma23c/BIOS.ROM", + 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(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_VIDEO, 3, 4, 1, 2); + device_add(&i430tx_device); + device_add(&piix4_device); + device_add(&nec_mate_unk_device); + device_add_params(&fdc37c67x_device, (void *) (FDC37XXX2 | FDC37XXXX_370)); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + return ret; +} + int machine_at_an430tx_init(const machine_t *model) { @@ -1106,37 +1228,6 @@ machine_at_an430tx_init(const machine_t *model) return ret; } -int -machine_at_ym430tx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ym430tx/YM430TX.003", - 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, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); - device_add(&i430tx_device); - device_add(&piix4_device); - device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 128); - - return ret; -} - int machine_at_mb540n_init(const machine_t *model) { @@ -1262,47 +1353,7 @@ machine_at_richmond_init(const machine_t *model) return ret; } -int -machine_at_tomahawk_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tomahawk/0AAGT046.ROM", - 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(0x0F, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ - pci_register_slot(0x0D, PCI_CARD_VIDEO, 3, 0, 0, 0); - pci_register_slot(0x0E, PCI_CARD_NETWORK, 4, 0, 0, 0); - pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); - device_add(&i430tx_device); - device_add(&piix4_device); - device_add_params(&fdc37c67x_device, (void *) (FDC37XXX2 | FDC37XXXX_370)); - device_add(&amd_flash_29f020a_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 128); - device_add(&lm78_device); /* fans: Thermal, CPU, Chassis; temperature: unused */ - device_add(&lm75_1_4a_device); /* temperature: CPU */ - - if ((gfxcard[0] == VID_INTERNAL) && machine_get_vid_device(machine)) - device_add(machine_get_vid_device(machine)); - - if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)) - device_add(machine_get_snd_device(machine)); - - if ((net_cards_conf[0].device_num == NET_INTERNAL) && machine_get_net_device(machine)) - device_add(machine_get_net_device(machine)); - - return ret; -} - +/* VIA VPX */ int machine_at_ficva502_init(const machine_t *model) { @@ -1333,6 +1384,7 @@ machine_at_ficva502_init(const machine_t *model) return ret; } +/* VIA VP3 */ int machine_at_ficpa2012_init(const machine_t *model) { @@ -1397,12 +1449,13 @@ machine_at_via809ds_init(const machine_t *model) return ret; } +/* SiS 5571 */ int -machine_at_r534f_init(const machine_t *model) +machine_at_cb52xsi_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/r534f/r534f008.bin", + ret = bios_load_linear("roms/machines/cb52xsi/CD5205S.ROM", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1413,14 +1466,14 @@ machine_at_r534f_init(const machine_t *model) 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, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&sis_5571_device); device_add(&kbc_ps2_ami_pci_device); - device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); + device_add_params(&fdc37c669_device, (void *) FDC37C6XX_370); device_add(&sst_flash_29ee010_device); return ret; @@ -1456,11 +1509,11 @@ machine_at_ms5146_init(const machine_t *model) } int -machine_at_cb52xsi_init(const machine_t *model) +machine_at_r534f_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/cb52xsi/CD5205S.ROM", + ret = bios_load_linear("roms/machines/r534f/r534f008.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1471,19 +1524,20 @@ machine_at_cb52xsi_init(const machine_t *model) 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, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&sis_5571_device); device_add(&kbc_ps2_ami_pci_device); - device_add_params(&fdc37c669_device, (void *) FDC37C6XX_370); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); device_add(&sst_flash_29ee010_device); return ret; } +/* SiS 5581 */ int machine_at_sp97xv_init(const machine_t *model) { @@ -1540,6 +1594,7 @@ machine_at_sq578_init(const machine_t *model) return ret; } +/* SiS 5591 */ int machine_at_ms5172_init(const machine_t *model) { @@ -1568,37 +1623,7 @@ machine_at_ms5172_init(const machine_t *model) return ret; } -int -machine_at_m560_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/m560/5600410s.ami", - 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, 0, 0, 0, 0); - 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(0x0C, PCI_CARD_SOUTHBRIDGE_PMU, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE_USB, 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 */ - device_add(&sst_flash_29ee010_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 256); - - return ret; -} - +/* ALi ALADDiN IV+ */ int machine_at_m5ata_init(const machine_t *model) { @@ -1662,30 +1687,32 @@ machine_at_ms5164_init(const machine_t *model) } int -machine_at_thunderbolt_init(const machine_t *model) +machine_at_m560_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/thunderbolt/tbolt-01.rom", - 0x000c0000, 262144, 0); + ret = bios_load_linear("roms/machines/m560/5600410s.ami", + 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; - machine_at_common_init(model); + 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, 0, 1, 2, 3); /* PIIX4 */ - pci_register_slot(0x11, PCI_CARD_NORMAL, 0, 1, 2, 3); - pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 3, 0); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 0, 1); - pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 0, 1, 2); - device_add(&i430tx_device); - device_add(&piix4_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL | FDC37C93X_NO_NVR)); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 128); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + 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(0x0C, PCI_CARD_SOUTHBRIDGE_PMU, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE_USB, 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 */ + device_add(&sst_flash_29ee010_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 256); return ret; } diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index d9933cc08..76d266ee4 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -8,11 +8,9 @@ * * Implementation of Socket 7 (Single Voltage) machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2020 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -43,75 +41,7 @@ #include <86box/plat_unused.h> #include <86box/sound.h> -static void -machine_at_thor_gpio_init(void) -{ - uint32_t gpio = 0xffffe1cf; - - /* Register 0x0078 (Undocumented): */ - /* Bit 5: 0 = Multiplier. */ - /* Bit 4: 0 = Multiplier. */ - /* 1.5: 0, 0. */ - /* 3.0: 0, 1. */ - /* 2.0: 1, 0. */ - /* 2.5: 1, 1. */ - /* Bit 1: 0 = Error beep, 1 = No error. */ - if (cpu_dmulti <= 1.5) - gpio |= 0xffff0000; - else if ((cpu_dmulti > 1.5) && (cpu_dmulti <= 2.0)) - gpio |= 0xffff0020; - else if ((cpu_dmulti > 2.0) && (cpu_dmulti <= 2.5)) - gpio |= 0xffff0030; - else if (cpu_dmulti > 2.5) - gpio |= 0xffff0010; - - /* Register 0x0079: */ - /* Bit 7: 0 = Clear password, 1 = Keep password. */ - /* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */ - /* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */ - /* Bit 4: External CPU clock (Switch 8). */ - /* Bit 3: External CPU clock (Switch 7). */ - /* 50 MHz: Switch 7 = Off, Switch 8 = Off. */ - /* 60 MHz: Switch 7 = On, Switch 8 = Off. */ - /* 66 MHz: Switch 7 = Off, Switch 8 = On. */ - /* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */ - /* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */ - /* Bit 0: 0 = Reserved. */ - /* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */ - if (cpu_busspeed <= 50000000) - gpio |= 0xffff0000; - else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000)) - gpio |= 0xffff0800; - else if (cpu_busspeed > 60000000) - gpio |= 0xffff1000; - - machine_set_gpio_default(gpio); -} - -static void -machine_at_thor_common_init(const machine_t *model, int has_video) -{ - machine_at_common_init_ex(model, 2); - machine_at_thor_gpio_init(); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 2, 1); - pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 3, 2, 1); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - - if (has_video && (gfxcard[0] == VID_INTERNAL)) - device_add(machine_get_vid_device(machine)); - - device_add(&i430fx_device); - device_add(&piix_device); - device_add_params(&pc87306_device, (void *) PCX730X_AMI); - device_add(&intel_flash_bxt_ami_device); -} - +/* i430FX */ static void machine_at_p54tp4xe_common_init(const machine_t *model) { @@ -192,6 +122,75 @@ machine_at_exp8551_init(const machine_t *model) return ret; } +static void +machine_at_thor_gpio_init(void) +{ + uint32_t gpio = 0xffffe1cf; + + /* Register 0x0078 (Undocumented): */ + /* Bit 5: 0 = Multiplier. */ + /* Bit 4: 0 = Multiplier. */ + /* 1.5: 0, 0. */ + /* 3.0: 0, 1. */ + /* 2.0: 1, 0. */ + /* 2.5: 1, 1. */ + /* Bit 1: 0 = Error beep, 1 = No error. */ + if (cpu_dmulti <= 1.5) + gpio |= 0xffff0000; + else if ((cpu_dmulti > 1.5) && (cpu_dmulti <= 2.0)) + gpio |= 0xffff0020; + else if ((cpu_dmulti > 2.0) && (cpu_dmulti <= 2.5)) + gpio |= 0xffff0030; + else if (cpu_dmulti > 2.5) + gpio |= 0xffff0010; + + /* Register 0x0079: */ + /* Bit 7: 0 = Clear password, 1 = Keep password. */ + /* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */ + /* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */ + /* Bit 4: External CPU clock (Switch 8). */ + /* Bit 3: External CPU clock (Switch 7). */ + /* 50 MHz: Switch 7 = Off, Switch 8 = Off. */ + /* 60 MHz: Switch 7 = On, Switch 8 = Off. */ + /* 66 MHz: Switch 7 = Off, Switch 8 = On. */ + /* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */ + /* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */ + /* Bit 0: 0 = Reserved. */ + /* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */ + if (cpu_busspeed <= 50000000) + gpio |= 0xffff0000; + else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000)) + gpio |= 0xffff0800; + else if (cpu_busspeed > 60000000) + gpio |= 0xffff1000; + + machine_set_gpio_default(gpio); +} + +static void +machine_at_thor_common_init(const machine_t *model, int has_video) +{ + machine_at_common_init_ex(model, 2); + machine_at_thor_gpio_init(); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 2, 1); + pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 3, 2, 1); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (has_video && (gfxcard[0] == VID_INTERNAL)) + device_add(machine_get_vid_device(machine)); + + device_add(&i430fx_device); + device_add(&piix_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); + device_add(&intel_flash_bxt_ami_device); +} + int machine_at_gw2katx_init(const machine_t *model) { @@ -209,6 +208,38 @@ machine_at_gw2katx_init(const machine_t *model) return ret; } +int +machine_at_vectra54_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/vectra54/GT0724.22", + 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, 0, 0, 0, 0); + pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_VIDEO, 0, 0, 0, 0); + pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&s3_phoenix_trio64_onboard_pci_device); + + device_add(&i430fx_device); + device_add(&piix_device); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_NORMAL)); + device_add(&sst_flash_29ee010_device); + + return ret; +} + int machine_at_thor_init(const machine_t *model) { @@ -521,11 +552,11 @@ machine_at_fmb_init(const machine_t *model) } int -machine_at_acerm3a_init(const machine_t *model) +machine_at_acerv35n_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/acerm3a/r01-b3.bin", + ret = bios_load_linear("roms/machines/acerv35n/v35nd1s1.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -536,15 +567,15 @@ machine_at_acerm3a_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x10, PCI_CARD_VIDEO, 4, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); device_add(&i430hx_device); device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL)); - + /* The chip is not marked FR but the BIOS accesses register 06h of GPIO. */ + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_FR)); device_add(&sst_flash_29ee010_device); return ret; @@ -651,7 +682,6 @@ const device_t d943_device = { int machine_at_d943_init(const machine_t *model) - { int ret = 0; const char* fn; @@ -691,6 +721,7 @@ machine_at_d943_init(const machine_t *model) return ret; } +/* i430VX */ int machine_at_gw2kma_init(const machine_t *model) { @@ -727,6 +758,110 @@ machine_at_gw2kma_init(const machine_t *model) return ret; } +/* SiS 5501 */ +static const device_config_t c5sbm2_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "5sbm2", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AwardBIOS v4.50GP - Revision 07/17/1995", .internal_name = "5sbm2_v450gp", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/5SBM0717.BIN", "" } }, + { .name = "AwardBIOS v4.50PG - Revision 03/26/1996", .internal_name = "5sbm2", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/5SBM0326.BIN", "" } }, + { .name = "AwardBIOS v4.51PG - Revision 2.2 (by Unicore Software)", .internal_name = "5sbm2_451pg", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/2A5ICC3A.BIN", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t c5sbm2_device = { + .name = "Chaintech 5SBM/5SBM2 (M103)", + .internal_name = "5sbm2_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = c5sbm2_config +}; + +int +machine_at_5sbm2_init(const machine_t *model) +{ + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + 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(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add(&kbc_at_ami_device); + device_add(&sis_550x_device); + device_add_params(&um866x_device, (void *) UM8663AF); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +/* SiS 5511 */ +int +machine_at_amis727_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/amis727/S727p.rom", + 0x000e0000, 131072, 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, 0xFE, 0xFF, 0, 0); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add(&sis_5511_device); + device_add(&kbc_ps2_intel_ami_pci_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); + + return ret; +} + static const device_config_t ap5s_config[] = { // clang-format off { @@ -798,169 +933,6 @@ 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_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, 0xFE, 0xFF, 0, 0); - pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); - - device_add(&sis_5511_device); - device_add(&kbc_ps2_ami_device); - device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_88)); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_amis727_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/amis727/S727p.rom", - 0x000e0000, 131072, 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, 0xFE, 0xFF, 0, 0); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add(&sis_5511_device); - device_add(&kbc_ps2_intel_ami_pci_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_vectra54_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/vectra54/GT0724.22", - 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, 0, 0, 0, 0); - pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_VIDEO, 0, 0, 0, 0); - pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); - - if (gfxcard[0] == VID_INTERNAL) - device_add(&s3_phoenix_trio64_onboard_pci_device); - - device_add(&i430fx_device); - device_add(&piix_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_NORMAL)); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -static const device_config_t c5sbm2_config[] = { - // clang-format off - { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, - .default_string = "5sbm2", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "AwardBIOS v4.50GP - Revision 07/17/1995", .internal_name = "5sbm2_v450gp", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/5SBM0717.BIN", "" } }, - { .name = "AwardBIOS v4.50PG - Revision 03/26/1996", .internal_name = "5sbm2", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/5SBM0326.BIN", "" } }, - { .name = "AwardBIOS v4.51PG - Revision 2.2 (by Unicore Software)", .internal_name = "5sbm2_451pg", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/2A5ICC3A.BIN", "" } }, - { .files_no = 0 } - }, - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t c5sbm2_device = { - .name = "Chaintech 5SBM/5SBM2 (M103)", - .internal_name = "5sbm2_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = c5sbm2_config -}; - -int -machine_at_5sbm2_init(const machine_t *model) -{ - int ret = 0; - const char* fn; - - /* No ROMs available */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - 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(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&kbc_at_ami_device); - device_add(&sis_550x_device); - device_add_params(&um866x_device, (void *) UM8663AF); - device_add(&sst_flash_29ee010_device); - - return ret; -} - int machine_at_pc140_6260_init(const machine_t *model) { @@ -991,3 +963,32 @@ machine_at_pc140_6260_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_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, 0xFE, 0xFF, 0, 0); + pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); + + device_add(&sis_5511_device); + device_add(&kbc_ps2_ami_device); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_88)); + device_add(&sst_flash_29ee010_device); + + return ret; +} diff --git a/src/machine/m_at_socket8.c b/src/machine/m_at_socket8.c index d9d35b161..23bd36d3c 100644 --- a/src/machine/m_at_socket8.c +++ b/src/machine/m_at_socket8.c @@ -8,11 +8,9 @@ * * Implementation of Socket 8 machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -40,6 +38,7 @@ #include "cpu.h" #include <86box/machine.h> +/* i450KX */ int machine_at_ap61_init(const machine_t *model) { @@ -68,7 +67,6 @@ machine_at_ap61_init(const machine_t *model) device_add(&kbc_ps2_acer_pci_device); device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&sst_flash_29ee010_device); - // device_add(&intel_flash_bxt_device); return ret; } @@ -107,64 +105,79 @@ machine_at_p6rp4_init(const machine_t *model) return ret; } +static const device_config_t ficpo6000_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "405F03C", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, /*W1*/ + .bios = { + { .name = "PhoenixBIOS 4.05 - Revision 405F03C (CD-ROM Boot support)", .internal_name = "405F03C", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/ficpo6000/405F03C.ROM", "" } }, + { .name = "PhoenixBIOS 4.05 - Revision 405F05C (No CD-ROM Boot support)", .internal_name = "405F05C", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/ficpo6000/405F05C.ROM", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t ficpo6000_device = { + .name = "FIC PO-6000", + .internal_name = "ficpo6000_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ficpo6000_config +}; + int -machine_at_686nx_init(const machine_t *model) +machine_at_ficpo6000_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn; - ret = bios_load_linear("roms/machines/686nx/6nx.140", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; - machine_at_common_init(model); + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + 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, 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); - device_add(&i440fx_device); - device_add(&piix3_device); - device_add(&kbc_ps2_ami_pci_device); // Uses the AMIKEY keyboard controller - device_add_params(&um8669f_device, (void *) 0); - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_mb600n_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/mb600n/60915cs.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(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); - device_add(&i440fx_device); - device_add(&piix3_device); - device_add(&kbc_ps2_ami_pci_device); - device_add_params(&fdc37c669_device, (void *) 0); + pci_register_slot(0x19, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x14, PCI_CARD_NORTHBRIDGE_SEC, 0, 0, 0, 0); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + 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); + pci_register_slot(0x0c, PCI_CARD_IDE, 0, 0, 0, 0); + device_add(&i450kx_device); + device_add(&sio_zb_device); + device_add(&ide_cmd646_device); + /* Input port bit 2 must be 1 or CMOS Setup is disabled. */ + device_add_params(&pc87306_device, (void *) PCX730X_PHOENIX_42); device_add(&intel_flash_bxt_device); return ret; } +/* i440FX */ int machine_at_acerv60n_init(const machine_t *model) { @@ -196,11 +209,27 @@ machine_at_acerv60n_init(const machine_t *model) } int -machine_at_lgibmx61_init(const machine_t *model) +machine_at_p65up5_cp6nd_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/lgibmx61/bios.rom", + ret = bios_load_linear("roms/machines/p65up5/ND6I0218.AWD", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_p65up5_common_init(model, &i440fx_device); + + return ret; +} + +int +machine_at_8600ttc_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/8600ttc/TTC0715B.ROM", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -211,51 +240,15 @@ machine_at_lgibmx61_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); + 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); device_add(&i440fx_device); device_add(&piix3_device); - device_add(&kbc_ps2_ami_device); - device_add_params(&w83877_device, (void *) (W83877F | W83877_250)); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_vs440fx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/vs440fx/1018CS1_.BIO", - "roms/machines/vs440fx/1018CS1_.BI1", - "roms/machines/vs440fx/1018CS1_.BI2", - "roms/machines/vs440fx/1018CS1_.BI3", - "roms/machines/vs440fx/1018CS1_.RCV", - 0x3a000, 128); - - 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(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i440fx_device); - device_add(&piix3_device); - device_add_params(&pc87307_device, (void *) (PCX730X_AMI | PCX7307_PC87307)); - - device_add(&intel_flash_bxt_ami_device); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(machine_get_snd_device(machine)); + device_add(&kbc_ps2_ami_pci_device); + device_add_params(&fdc37c669_device, (void *) 0); + device_add(&intel_flash_bxt_device); return ret; } @@ -332,6 +325,35 @@ machine_at_gw2kvenus_init(const machine_t *model) return ret; } +int +machine_at_686nx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/686nx/6nx.140", + 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(0x07, PCI_CARD_SOUTHBRIDGE, 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); + device_add(&i440fx_device); + device_add(&piix3_device); + device_add(&kbc_ps2_ami_pci_device); // Uses the AMIKEY keyboard controller + device_add_params(&um8669f_device, (void *) 0); + device_add(&intel_flash_bxt_device); + + return ret; +} + int machine_at_ap440fx_init(const machine_t *model) { @@ -371,11 +393,47 @@ machine_at_ap440fx_init(const machine_t *model) } int -machine_at_8600ttc_init(const machine_t *model) +machine_at_vs440fx_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/8600ttc/TTC0715B.ROM", + ret = bios_load_linear_combined2("roms/machines/vs440fx/1018CS1_.BIO", + "roms/machines/vs440fx/1018CS1_.BI1", + "roms/machines/vs440fx/1018CS1_.BI2", + "roms/machines/vs440fx/1018CS1_.BI3", + "roms/machines/vs440fx/1018CS1_.RCV", + 0x3a000, 128); + + 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(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i440fx_device); + device_add(&piix3_device); + device_add_params(&pc87307_device, (void *) (PCX730X_AMI | PCX7307_PC87307)); + + device_add(&intel_flash_bxt_ami_device); + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(machine_get_snd_device(machine)); + + return ret; +} + +int +machine_at_lgibmx61_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/lgibmx61/bios.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -386,15 +444,15 @@ machine_at_8600ttc_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 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(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&i440fx_device); device_add(&piix3_device); - device_add(&kbc_ps2_ami_pci_device); - device_add_params(&fdc37c669_device, (void *) 0); - device_add(&intel_flash_bxt_device); + device_add(&kbc_ps2_ami_device); + device_add_params(&w83877_device, (void *) (W83877F | W83877_250)); + device_add(&sst_flash_29ee010_device); return ret; } @@ -427,39 +485,31 @@ machine_at_m6mi_init(const machine_t *model) return ret; } -void -machine_at_p65up5_common_init(const machine_t *model, const device_t *northbridge) -{ - 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(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - device_add(northbridge); - device_add(&piix3_ioapic_device); - device_add(&kbc_ps2_ami_pci_device); - device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); - device_add(&sst_flash_29ee010_device); - device_add(&ioapic_device); -} - int -machine_at_p65up5_cp6nd_init(const machine_t *model) +machine_at_mb600n_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/p65up5/ND6I0218.AWD", + ret = bios_load_linear("roms/machines/mb600n/60915cs.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; - machine_at_p65up5_common_init(model, &i440fx_device); + 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(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&i440fx_device); + device_add(&piix3_device); + device_add(&kbc_ps2_ami_pci_device); + device_add_params(&fdc37c669_device, (void *) 0); + device_add(&intel_flash_bxt_device); return ret; } diff --git a/src/machine/m_at_sockets7.c b/src/machine/m_at_sockets7.c index 28d3033fb..bee5939f9 100644 --- a/src/machine/m_at_sockets7.c +++ b/src/machine/m_at_sockets7.c @@ -8,11 +8,9 @@ * * Implementation of Super Socket 7 machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2020 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -40,6 +38,7 @@ #include <86box/snd_ac97.h> #include <86box/clock.h> +/* ALi ALADDiN V */ int machine_at_p5a_init(const machine_t *model) { @@ -207,6 +206,7 @@ machine_at_5ax_init(const machine_t *model) return ret; } +/* VIA MVP3 */ int machine_at_ax59pro_init(const machine_t *model) { @@ -239,6 +239,38 @@ machine_at_ax59pro_init(const machine_t *model) return ret; } +int +machine_at_delhi3_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/delhi3/DELHI3.ROM", + 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(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + + device_add(&via_mvp3_device); + device_add(&via_vt82c596a_device); + device_add(&kbc_ps2_ami_pci_device); + device_add_params(&w83877_device, (void *) (W83877TF | W83877_250)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 256); + + if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)) + device_add(machine_get_snd_device(machine)); + + return ret; +} + int machine_at_mvp3_init(const machine_t *model) { @@ -343,38 +375,7 @@ machine_at_5emapro_init(const machine_t *model) return ret; } -int -machine_at_delhi3_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/delhi3/DELHI3.ROM", - 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(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - - device_add(&via_mvp3_device); - device_add(&via_vt82c596a_device); - device_add(&kbc_ps2_ami_pci_device); - device_add_params(&w83877_device, (void *) (W83877TF | W83877_250)); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 256); - - if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)) - device_add(machine_get_snd_device(machine)); - - return ret; -} - +/* SiS 5591 */ int machine_at_5sg100_init(const machine_t *model) { diff --git a/src/machine/m_at_t3100e.c b/src/machine/m_at_t3100e.c index 92daa610c..fb9676d5c 100644 --- a/src/machine/m_at_t3100e.c +++ b/src/machine/m_at_t3100e.c @@ -117,15 +117,13 @@ * bit 2 set for single-pixel LCD font * bits 0,1 for display font * - * - * - * Authors: Fred N. van Kempen, + * Authors: John Elliott, + * Fred N. van Kempen, * Miran Grca, - * John Elliott, * - * Copyright 2017-2018 Fred N. van Kempen. - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 John Elliott. + * Copyright 2008-2025 John Elliott. + * Copyright 2017-2025 Fred N. van Kempen. + * Copyright 2016-2025 Miran Grca. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/machine/m_xt.c b/src/machine/m_xt.c index a77694f36..b09111b19 100644 --- a/src/machine/m_xt.c +++ b/src/machine/m_xt.c @@ -6,18 +6,16 @@ * * This file is part of the 86Box distribution. * - * Standard PC/AT implementation. + * Implementation of PC and XT machines. * - * - * - * Authors: Fred N. van Kempen, + * Authors: Sarah Walker, * Miran Grca, - * Sarah Walker, + * Fred N. van Kempen, * Jasmine Iwanek, * - * Copyright 2017-2020 Fred N. van Kempen. - * Copyright 2016-2020 Miran Grca. - * Copyright 2008-2020 Sarah Walker. + * Copyright 2008-2025 Sarah Walker. + * Copyright 2016-2025 Miran Grca. + * Copyright 2017-2025 Fred N. van Kempen. * Copyright 2025 Jasmine Iwanek. */ #include @@ -33,8 +31,11 @@ #include <86box/fdd.h> #include <86box/fdc.h> #include <86box/fdc_ext.h> +#include <86box/lpt.h> #include <86box/hdc.h> #include <86box/gameport.h> +#include <86box/serial.h> +#include <86box/sio.h> #include <86box/ibm_5161.h> #include <86box/keyboard.h> #include <86box/rom.h> @@ -46,6 +47,7 @@ extern const device_t vendex_xt_rtc_onboard_device; +/* 8088 */ static void machine_xt_common_init(const machine_t *model, int fixed_floppy) { @@ -123,7 +125,7 @@ const device_t ibmpc_device = { }; int -machine_pc_init(const machine_t *model) +machine_ibmpc_init(const machine_t *model) { int ret = 0; int ret2; @@ -233,7 +235,7 @@ const device_t ibmpc82_device = { }; int -machine_pc82_init(const machine_t *model) +machine_ibmpc82_init(const machine_t *model) { int ret = 0; int ret2; @@ -401,7 +403,7 @@ const device_t ibmxt_device = { }; int -machine_xt_init(const machine_t *model) +machine_ibmxt_init(const machine_t *model) { int ret = 0; uint8_t enable_5161; @@ -451,24 +453,6 @@ machine_xt_init(const machine_t *model) return ret; } -int -machine_genxt_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/genxt/pcxt.rom", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - device_add(&kbc_xt_device); - - machine_xt_common_init(model, 0); - - return ret; -} - static const device_config_t ibmxt86_config[] = { // clang-format off { @@ -585,7 +569,7 @@ const device_t ibmxt86_device = { }; int -machine_xt86_init(const machine_t *model) +machine_ibmxt86_init(const machine_t *model) { int ret = 0; uint8_t enable_5161; @@ -669,39 +653,14 @@ machine_xt_amixt_init(const machine_t *model) return ret; } -int -machine_xt_tuliptc8_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tuliptc8/tulip-bios_xt_compact_2.bin", - 0x000fc000, 16384, 0); - - if (bios_only || !ret) - return ret; - - device_add(&kbc_xt_fe2010_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - machine_common_init(model); - - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - - nmi_init(); - standalone_gameport_type = &gameport_200_device; - - device_add(&amstrad_megapc_nvr_device); - - return ret; -} - -// TODO -// Onboard EGA Graphics (NSI Logic EVC315-S on early boards STMicroelectronics EGA on later revisions) -// RTC -// Adaptec ACB-2072 RLL Controller Card (Optional) -// Atari PCM1 Mouse Support +/* + TODO: + - Onboard EGA Graphics (NSI Logic EVC315-S on early boards + STMicroelectronics EGA on later revisions); + - RTC; + - Adaptec ACB-2072 RLL Controller Card (Optional); + - Atari PCM1 Mouse Support. + */ int machine_xt_ataripc3_init(const machine_t *model) { @@ -723,11 +682,11 @@ machine_xt_ataripc3_init(const machine_t *model) } int -machine_xt_znic_init(const machine_t *model) +machine_xt_bw230_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/znic/ibmzen.rom", + ret = bios_load_linear("roms/machines/bw230/bondwell.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -738,6 +697,53 @@ machine_xt_znic_init(const machine_t *model) return ret; } +int +machine_xt_mpc1600_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/mpc1600/mpc4.34_merged.bin", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_pc82_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_xt_compaq_portable_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/portable/compaq portable plus 100666-001 rev c u47.bin", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + machine_common_init(model); + + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); + + device_add(&kbc_xt_compaq_device); + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_xt_device); + nmi_init(); + if (joystick_type) + device_add(&gameport_200_device); + + lpt_t *lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_setup(lpt, LPT_MDA_ADDR); + lpt_set_3bc_used(1); + + return ret; +} + int machine_xt_dtk_init(const machine_t *model) { @@ -754,6 +760,124 @@ machine_xt_dtk_init(const machine_t *model) return ret; } +int +machine_xt_pcspirit_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pcspirit/u1101.bin", + 0x000fe000, 16384, 0); + + if (ret) { + bios_load_aux_linear("roms/machines/pcspirit/u1103.bin", + 0x000fc000, 8192, 0); + } + + if (bios_only || !ret) + return ret; + + device_add(&kbc_pc82_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_genxt_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/genxt/pcxt.rom", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_xt_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_xt_glabios_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/glabios/GLABIOS_0.4.0_8X.ROM", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_xt_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_xt_top88_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/top88/Hyosung Topstar 88T - BIOS version 3.0.bin", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + + /* On-board FDC cannot be disabled */ + machine_xt_clone_init(model, 1); + + return ret; +} + +static void +machine_xt_hyundai_common_init(const machine_t *model, int fixed_floppy) +{ + device_add(&kbc_xt_hyundai_device); + + machine_xt_common_init(model, fixed_floppy); +} + +int +machine_xt_super16t_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/super16t/Hyundai SUPER-16T - System BIOS HEA v1.12Ta (16k)(MBM27128)(1986).BIN", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + + /* On-board FDC cannot be disabled */ + machine_xt_hyundai_common_init(model, 1); + + return ret; +} + +int +machine_xt_super16te_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/super16te/Hyundai SUPER-16TE - System BIOS v2.00Id (16k)(D27128A)(1989).BIN", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + + /* On-board FDC cannot be disabled */ + machine_xt_hyundai_common_init(model, 1); + + return ret; +} + static const device_config_t jukopc_config[] = { // clang-format off { @@ -816,6 +940,92 @@ machine_xt_jukopc_init(const machine_t *model) return ret; } +int +machine_xt_kaypropc_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/kaypropc/Kaypro_v2.03K.bin", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + machine_xt_clone_init(model, 0); + + return ret; +} + +int +machine_xt_micoms_xl7turbo_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/mxl7t/XL7_TURBO.BIN", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_xt_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_xt_pc500_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc500/rom404.bin", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_pc_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_xt_pc700_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc700/multitech pc-700 3.1.bin", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_pc_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_xt_pc4i_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc4i/NCR_PC4i_BIOSROM_1985.BIN", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + + machine_xt_clone_init(model, 0); + + return ret; +} + int machine_xt_openxt_init(const machine_t *model) { @@ -832,22 +1042,39 @@ machine_xt_openxt_init(const machine_t *model) return ret; } +static void +machine_xt_philips_common_init(const machine_t *model) +{ + machine_common_init(model); + + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); + + nmi_init(); + + standalone_gameport_type = &gameport_200_device; + + device_add(&kbc_pc_device); + + device_add(&philips_device); + + device_add(&xta_hd20_device); +} + int -machine_xt_pcxt_init(const machine_t *model) +machine_xt_p3105_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/pcxt/u18.rom", - 0x000f8000, 65536, 0); - if (ret) { - bios_load_aux_linear("roms/machines/pcxt/u19.rom", - 0x000f0000, 32768, 0); - } + ret = bios_load_linear("roms/machines/p3105/philipsnms9100.bin", + 0x000fc000, 16384, 0); if (bios_only || !ret) return ret; - machine_xt_clone_init(model, 0); + machine_xt_philips_common_init(model); + + /* On-board FDC cannot be disabled */ + device_add(&fdc_xt_device); return ret; } @@ -870,52 +1097,6 @@ machine_xt_pxxt_init(const machine_t *model) return ret; } -int -machine_xt_iskra3104_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/iskra3104/198.bin", - "roms/machines/iskra3104/199.bin", - 0x000fc000, 16384, 0); - - if (bios_only || !ret) - return ret; - - machine_xt_clone_init(model, 0); - - return ret; -} - -int -machine_xt_maz1016_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/maz1016/e1.bin", - "roms/machines/maz1016/e4.bin", - 0x000fc000, 49152, 0); - - if (ret) { - bios_load_aux_interleaved("roms/machines/maz1016/e2.bin", - "roms/machines/maz1016/e5.bin", - 0x000f8000, 16384, 0); - - bios_load_aux_interleaved("roms/machines/maz1016/e3.bin", - "roms/machines/maz1016/e6b.bin", - 0x000f4000, 16384, 0); - } - - if (bios_only || !ret) - return ret; - - loadfont("roms/machines/maz1016/crt-8.bin", 0); - - machine_xt_clone_init(model, 0); - - return ret; -} - int machine_xt_pravetz16_imko4_init(const machine_t *model) { @@ -969,29 +1150,11 @@ machine_xt_pravetz16s_cpu12p_init(const machine_t *model) } int -machine_xt_micoms_xl7turbo_init(const machine_t *model) +machine_xt_pb8810_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/mxl7t/XL7_TURBO.BIN", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - device_add(&kbc_xt_device); - - machine_xt_common_init(model, 0); - - return ret; -} - -int -machine_xt_pc4i_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pc4i/NCR_PC4i_BIOSROM_1985.BIN", + ret = bios_load_linear("roms/machines/pb8810/pb8088-8810-633acc631aba0345517682.bin", 0x000fc000, 16384, 0); if (bios_only || !ret) @@ -1003,78 +1166,38 @@ machine_xt_pc4i_init(const machine_t *model) } int -machine_xt_mpc1600_init(const machine_t *model) +machine_xt_sansx16_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/mpc1600/mpc4.34_merged.bin", + ret = bios_load_linear("roms/machines/sansx16/tmm27128ad.bin.bin", 0x000fc000, 16384, 0); if (bios_only || !ret) return ret; - device_add(&kbc_pc82_device); - - machine_xt_common_init(model, 0); + /* On-board FDC cannot be disabled */ + machine_xt_clone_init(model, 1); return ret; } int -machine_xt_pcspirit_init(const machine_t *model) +machine_xt_pcxt_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/pcspirit/u1101.bin", - 0x000fe000, 16384, 0); - + ret = bios_load_linear("roms/machines/pcxt/u18.rom", + 0x000f8000, 65536, 0); if (ret) { - bios_load_aux_linear("roms/machines/pcspirit/u1103.bin", - 0x000fc000, 8192, 0); + bios_load_aux_linear("roms/machines/pcxt/u19.rom", + 0x000f0000, 32768, 0); } if (bios_only || !ret) return ret; - device_add(&kbc_pc82_device); - - machine_xt_common_init(model, 0); - - return ret; -} - -int -machine_xt_pc700_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pc700/multitech pc-700 3.1.bin", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - device_add(&kbc_pc_device); - - machine_xt_common_init(model, 0); - - return ret; -} - -int -machine_xt_pc500_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pc500/rom404.bin", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - device_add(&kbc_pc_device); - - machine_xt_common_init(model, 0); + machine_xt_clone_init(model, 0); return ret; } @@ -1144,70 +1267,45 @@ machine_xt_vendex_init(const machine_t *model) } static void -machine_xt_hyundai_common_init(const machine_t *model, int fixed_floppy) +machine_xt_laserxt_common_init(const machine_t *model,int is_lxt3) { - device_add(&kbc_xt_hyundai_device); + machine_common_init(model); - machine_xt_common_init(model, fixed_floppy); + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_xt_device); + + nmi_init(); + standalone_gameport_type = &gameport_200_device; + + device_add(is_lxt3 ? &lxt3_device : &laserxt_device); + + device_add(&kbc_xt_lxt3_device); } int -machine_xt_super16t_init(const machine_t *model) +machine_xt_laserxt_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/super16t/Hyundai SUPER-16T - System BIOS HEA v1.12Ta (16k)(MBM27128)(1986).BIN", - 0x000fc000, 16384, 0); + ret = bios_load_linear("roms/machines/ltxt/27c64.bin", + 0x000fe000, 8192, 0); if (bios_only || !ret) return ret; - /* On-board FDC cannot be disabled */ - machine_xt_hyundai_common_init(model, 1); + machine_xt_laserxt_common_init(model, 0); return ret; } int -machine_xt_super16te_init(const machine_t *model) +machine_xt_znic_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/super16te/Hyundai SUPER-16TE - System BIOS v2.00Id (16k)(D27128A)(1989).BIN", - 0x000fc000, 16384, 0); - - if (bios_only || !ret) - return ret; - - /* On-board FDC cannot be disabled */ - machine_xt_hyundai_common_init(model, 1); - - return ret; -} - -int -machine_xt_top88_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/top88/Hyosung Topstar 88T - BIOS version 3.0.bin", - 0x000fc000, 16384, 0); - - if (bios_only || !ret) - return ret; - - /* On-board FDC cannot be disabled */ - machine_xt_clone_init(model, 1); - - return ret; -} - -int -machine_xt_kaypropc_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/kaypropc/Kaypro_v2.03K.bin", + ret = bios_load_linear("roms/machines/znic/ibmzen.rom", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -1218,39 +1316,129 @@ machine_xt_kaypropc_init(const machine_t *model) return ret; } +static void +machine_zenith_common_init(const machine_t *model) +{ + machine_common_init(model); + + device_add(&zenith_scratchpad_device); + + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); + + device_add(&kbc_xt_zenith_device); + + nmi_init(); +} + int -machine_xt_sansx16_init(const machine_t *model) +machine_xt_z151_init(const machine_t *model) { int ret; - - ret = bios_load_linear("roms/machines/sansx16/tmm27128ad.bin.bin", - 0x000fc000, 16384, 0); + ret = bios_load_linear("roms/machines/zdsz151/444-229-18.bin", + 0x000fc000, 32768, 0); + if (ret) { + bios_load_aux_linear("roms/machines/zdsz151/444-260-18.bin", + 0x000f8000, 16384, 0); + } if (bios_only || !ret) return ret; - /* On-board FDC cannot be disabled */ - machine_xt_clone_init(model, 1); + machine_zenith_common_init(model); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_xt_tandy_device); return ret; } +/* + * Current bugs and limitations: + * - Memory board support for EMS currently missing + */ int -machine_xt_bw230_init(const machine_t *model) +machine_xt_z159_init(const machine_t *model) { - int ret; + lpt_t *lpt = NULL; + int ret; - ret = bios_load_linear("roms/machines/bw230/bondwell.bin", - 0x000fe000, 8192, 0); + ret = bios_load_linear("roms/machines/zdsz159/z159m v2.9e.10d", + 0x000f8000, 32768, 0); if (bios_only || !ret) return ret; - machine_xt_clone_init(model, 0); + machine_zenith_common_init(model); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_xt_tandy_device); + + /* parallel port is on the memory board */ + lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_remove(lpt); + lpt_port_setup(lpt, LPT2_ADDR); + lpt_set_next_inst(255); return ret; } +/* + * Current bugs and limitations: + * - missing NVRAM implementation + */ +int +machine_xt_z184_init(const machine_t *model) +{ + lpt_t *lpt = NULL; + int ret; + + ret = bios_load_linear("roms/machines/zdsupers/z184m v3.1d.10d", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + machine_zenith_common_init(model); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_xt_device); + + lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_remove(lpt); + lpt_port_setup(lpt, LPT2_ADDR); + lpt_set_next_inst(255); + + device_add(&ns8250_device); + /* So that serial_standalone_init() won't do anything. */ + serial_set_next_inst(SERIAL_MAX - 1); + + device_add(&cga_device); + + return ret; +} + +/* GC100A */ +int +machine_xt_p3120_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p3120/philips_p3120.bin", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + machine_xt_philips_common_init(model); + + device_add(&gc100a_device); + + device_add(&fdc_at_device); + + return ret; +} + +/* V20 */ int machine_xt_v20xt_init(const machine_t *model) { @@ -1268,35 +1456,143 @@ machine_xt_v20xt_init(const machine_t *model) } int -machine_xt_pb8810_init(const machine_t *model) +machine_xt_tuliptc8_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/pb8810/pb8088-8810-633acc631aba0345517682.bin", + ret = bios_load_linear("roms/machines/tuliptc8/tulip-bios_xt_compact_2.bin", 0x000fc000, 16384, 0); if (bios_only || !ret) return ret; + device_add(&kbc_xt_fe2010_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + machine_common_init(model); + + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); + + nmi_init(); + standalone_gameport_type = &gameport_200_device; + + device_add(&amstrad_megapc_nvr_device); + + return ret; +} + +/* 8086 */ +int +machine_xt_compaq_deskpro_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/deskpro/Compaq - BIOS - Revision J - 106265-002.bin", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + machine_common_init(model); + + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); + + device_add(&kbc_xt_compaq_device); + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_xt_device); + nmi_init(); + standalone_gameport_type = &gameport_200_device; + + lpt_t *lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_setup(lpt, LPT_MDA_ADDR); + lpt_set_3bc_used(1); + + return ret; +} + +int +machine_xt_pc5086_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc5086/sys_rom.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_common_init(model); + + device_add(&ct_82c100_device); + device_add(&f82c710_pc5086_device); + + device_add(&kbc_xt_device); + + device_add(&amstrad_megapc_nvr_device); /* NVR that is initialized to all 0x00's. */ + + return ret; +} + +int +machine_xt_maz1016_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/maz1016/e1.bin", + "roms/machines/maz1016/e4.bin", + 0x000fc000, 49152, 0); + + if (ret) { + bios_load_aux_interleaved("roms/machines/maz1016/e2.bin", + "roms/machines/maz1016/e5.bin", + 0x000f8000, 16384, 0); + + bios_load_aux_interleaved("roms/machines/maz1016/e3.bin", + "roms/machines/maz1016/e6b.bin", + 0x000f4000, 16384, 0); + } + + if (bios_only || !ret) + return ret; + + loadfont("roms/machines/maz1016/crt-8.bin", 0); + + machine_xt_clone_init(model, 0); + + return ret; +} + +int +machine_xt_iskra3104_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/iskra3104/198.bin", + "roms/machines/iskra3104/199.bin", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + machine_xt_clone_init(model, 0); return ret; } int -machine_xt_glabios_init(const machine_t *model) +machine_xt_lxt3_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/glabios/GLABIOS_0.4.0_8X.ROM", + ret = bios_load_linear("roms/machines/lxt3/27c64d.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) return ret; - device_add(&kbc_xt_device); - - machine_xt_common_init(model, 0); + machine_xt_laserxt_common_init(model, 1); return ret; } diff --git a/src/machine/m_xt_compaq.c b/src/machine/m_xt_compaq.c deleted file mode 100644 index a6f8164f2..000000000 --- a/src/machine/m_xt_compaq.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. - * - * Emulation of various Compaq XT-class PC's. - * - * - * - * Authors: Sarah Walker, - * Miran Grca, - * TheCollector1995, - * - * Copyright 2008-2019 Sarah Walker. - * Copyright 2016-2019 Miran Grca. - */ -#include -#include -#include -#include -#include <86box/86box.h> -#include "cpu.h" -#include <86box/nmi.h> -#include <86box/timer.h> -#include <86box/pit.h> -#include <86box/mem.h> -#include <86box/rom.h> -#include <86box/device.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/fdc_ext.h> -#include <86box/gameport.h> -#include <86box/keyboard.h> -#include <86box/lpt.h> -#include <86box/machine.h> - -int -machine_xt_compaq_deskpro_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/deskpro/Compaq - BIOS - Revision J - 106265-002.bin", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - machine_common_init(model); - - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - - device_add(&kbc_xt_compaq_device); - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_xt_device); - nmi_init(); - standalone_gameport_type = &gameport_200_device; - - lpt_t *lpt = device_add_inst(&lpt_port_device, 1); - lpt_port_setup(lpt, LPT_MDA_ADDR); - lpt_set_3bc_used(1); - - return ret; -} - -int -machine_xt_compaq_portable_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/portable/compaq portable plus 100666-001 rev c u47.bin", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - machine_common_init(model); - - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - - device_add(&kbc_xt_compaq_device); - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_xt_device); - nmi_init(); - if (joystick_type) - device_add(&gameport_200_device); - - lpt_t *lpt = device_add_inst(&lpt_port_device, 1); - lpt_port_setup(lpt, LPT_MDA_ADDR); - lpt_set_3bc_used(1); - - return ret; -} diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 40eab7788..4930910d5 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -25,55 +25,19 @@ #include <86box/mem.h> #include <86box/rom.h> #include <86box/device.h> -#include <86box/machine.h> +#include <86box/chipset.h> #include <86box/timer.h> #include <86box/fdd.h> #include <86box/fdc.h> #include <86box/keyboard.h> +#include <86box/sio.h> #include <86box/sound.h> #include <86box/video.h> +#include <86box/vid_cga.h> #include <86box/plat_unused.h> #include <86box/thread.h> #include <86box/network.h> - -// Temporarily here till we move everything out into the right files -extern const device_t pcjr_device; -extern const device_t m19_vid_device; -extern const device_t tandy_1000_video_device; -extern const device_t tandy_1000hx_video_device; -extern const device_t tandy_1000sl_video_device; - -extern const device_t t1000_video_device; -extern const device_t xi8088_device; -extern const device_t cga_device; -extern const device_t vid_1512_device; -extern const device_t vid_1640_device; -extern const device_t vid_pc2086_device; -extern const device_t vid_pc3086_device; -extern const device_t vid_200_device; -extern const device_t vid_ppc512_device; -extern const device_t t1200_video_device; -extern const device_t compaq_plasma_device; -extern const device_t ps1_2011_device; -extern const device_t ibmpc_device; -extern const device_t ibmpc82_device; -extern const device_t ibmxt_device; -extern const device_t ibmxt86_device; -extern const device_t ibmat_device; -extern const device_t ibmxt286_device; -extern const device_t pb450_device; -extern const device_t jukopc_device; -extern const device_t vendex_device; -extern const device_t c5sbm2_device; -extern const device_t sb486pv_device; -extern const device_t ap5s_device; -extern const device_t d842_device; -extern const device_t d943_device; -extern const device_t dells333sl_device; -extern const device_t hot433a_device; -extern const device_t pbl300sx_device; -extern const device_t v12p_device; -extern const device_t f82c710_pc5086_device; +#include <86box/machine.h> const machine_filter_t machine_types[] = { { "None", MACHINE_TYPE_NONE }, @@ -243,7 +207,7 @@ const machine_t machines[] = { .internal_name = "ibmpc", .type = MACHINE_TYPE_8088, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_pc_init, + .init = machine_ibmpc_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -285,7 +249,7 @@ const machine_t machines[] = { .internal_name = "ibmpc82", .type = MACHINE_TYPE_8088, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_pc82_init, + .init = machine_ibmpc82_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -369,7 +333,7 @@ const machine_t machines[] = { .internal_name = "ibmxt", .type = MACHINE_TYPE_8088, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_init, + .init = machine_ibmxt_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -411,7 +375,7 @@ const machine_t machines[] = { .internal_name = "ibmxt86", .type = MACHINE_TYPE_8088, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt86_init, + .init = machine_ibmxt86_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -1330,48 +1294,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - { - .name = "[8088] Samsung SPC-3000V/Packard Bell PB500/PB8810", - .internal_name = "pb8810", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_pb8810_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_8088, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 640, - .step = 128 - }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_xtclone_device, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = &keyboard_pc_xt_device, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, { .name = "[8088] Philips P3105/NMS9100", .internal_name = "p3105", @@ -1540,6 +1462,48 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + { + .name = "[8088] Samsung SPC-3000V/Packard Bell PB500/PB8810", + .internal_name = "pb8810", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pb8810_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_8088, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PC, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 640, + .step = 128 + }, + .nvrmask = 0, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = &keyboard_pc_xt_device, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, { .name = "[8088] Sanyo SX-16", .internal_name = "sansx16", @@ -2430,7 +2394,7 @@ const machine_t machines[] = { .internal_name = "pc5086", .type = MACHINE_TYPE_8086, .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_pc5086_init, + .init = machine_xt_pc5086_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -2938,7 +2902,7 @@ const machine_t machines[] = { .internal_name = "ibmat", .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_ibm_init, + .init = machine_at_ibmat_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -3277,6 +3241,48 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + { + .name = "[ISA] GRiD GRiDcase 1520", + .internal_name = "grid1520", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_PROPRIETARY, /* Machine has chipset: Faraday FE3400B */ + .init = machine_at_grid1520_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 10000000, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_IDE /*| MACHINE_VIDEO_FIXED*/ | MACHINE_KEYBOARD, + .ram = { + .min = 1024, + .max = 8192, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has IBM AT KBC firmware. */ { .name = "[ISA] MR BIOS 286 clone", @@ -3622,48 +3628,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - { - .name = "[ISA] GRiD GRiDcase 1520", - .internal_name = "grid1520", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_PROPRIETARY, /* Machine has chipset: Faraday FE3400B */ - .init = machine_at_grid1520_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 6000000, - .max_bus = 10000000, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE /*| MACHINE_VIDEO_FIXED*/ | MACHINE_KEYBOARD, - .ram = { - .min = 1024, - .max = 8192, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* No proper pictures of the KBC exist, though it seems to have the IBM AT KBC firmware. */ { @@ -5879,178 +5843,6 @@ const machine_t machines[] = { }, /* 386DX machines */ - /* Has a Jetkey V3, which identifies as a 'B'. */ - { - .name = "[ACC 2168] Juko AT046DX3", - .internal_name = "acc386", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_ACC_2168, - .init = machine_at_acc386_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has an AMI Keyboard BIOS PLUS KBC firmware ('8'). */ - { - .name = "[C&T 386/AT] ECS 386/32", - .internal_name = "ecs386", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_CT_386, - .init = machine_at_ecs386_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has IBM AT KBC firmware. */ - { - .name = "[C&T 386/AT] Samsung SPC-6000A", - .internal_name = "spc6000a", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_CT_386, - .init = machine_at_spc6000a_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 32768, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has IBM AT KBC firmware. */ - { - .name = "[C&T 386/AT] Tandy 4000", - .internal_name = "tandy4000", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_CT_386, - .init = machine_at_tandy4000_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Uses Compaq KBC firmware. */ { .name = "[ISA] Compaq Deskpro 386 (September 1986)", @@ -6264,6 +6056,178 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* Has a Jetkey V3, which identifies as a 'B'. */ + { + .name = "[ACC 2168] Juko AT046DX3", + .internal_name = "acc386", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_ACC_2168, + .init = machine_at_acc386_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_386DX, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has an AMI Keyboard BIOS PLUS KBC firmware ('8'). */ + { + .name = "[C&T 386/AT] ECS 386/32", + .internal_name = "ecs386", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_CT_386, + .init = machine_at_ecs386_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_386DX, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has IBM AT KBC firmware. */ + { + .name = "[C&T 386/AT] Samsung SPC-6000A", + .internal_name = "spc6000a", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_CT_386, + .init = machine_at_spc6000a_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_386DX, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 32768, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has IBM AT KBC firmware. */ + { + .name = "[C&T 386/AT] Tandy 4000", + .internal_name = "tandy4000", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_CT_386, + .init = machine_at_tandy4000_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_386DX, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, + .step = 1024 + }, + .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has a Lance LT38C41 with AMI Megakey P KBC firmware */ { .name = "[ALi M1429] ECS Panda 386V", @@ -6611,6 +6575,49 @@ const machine_t machines[] = { }, /* 386DX/486 machines */ + /* Winbond W83C42 with unknown firmware. */ + { + .name = "[ALi M1429G] DataExpert EXP4349", + .internal_name = "exp4349", + .type = MACHINE_TYPE_386DX_486, + .chipset = MACHINE_CHIPSET_ALI_M1429G, + .init = machine_at_exp4349_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_386DX | CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has AMIKey F KBC firmware. The EFAR chipst is a rebrand of OPTi 495SX. */ { .name = "[OPTi 495SX] CAF Technology C747", @@ -6740,49 +6747,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Winbond W83C42 with unknown firmware. */ - { - .name = "[ALi M1429G] DataExpert EXP4349", - .internal_name = "exp4349", - .type = MACHINE_TYPE_386DX_486, - .chipset = MACHINE_CHIPSET_ALI_M1429G, - .init = machine_at_exp4349_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX | CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Has IBM PS/2 Type 1 KBC firmware. */ { .name = "[MCA] IBM PS/2 model 70 (type 3)", @@ -6871,13 +6835,15 @@ const machine_t machines[] = { }, /* 486 machines - Socket 1 */ - /* Has Award KBC firmware. */ + /* Has JetKey 5 KBC Firmware - but the BIOS string ends in a hardcoded -F, and + the BIOS also explicitly expects command A1 to return a 'F', so it looks like + the JetKey 5 is a clone of AMIKey type F. */ { - .name = "[ZyMOS Poach] ASUS ISA-486C", - .internal_name = "isa486c", + .name = "[CS4031] AMI 486 CS4031", + .internal_name = "cs4031", .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_ZYMOS_POACH, - .init = machine_at_isa486c_init, + .chipset = MACHINE_CHIPSET_CT_CS4031, + .init = machine_at_cs4031_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -6892,54 +6858,11 @@ const machine_t machines[] = { .min_multi = 0, .max_multi = 0 }, - .bus_flags = MACHINE_AT, + .bus_flags = MACHINE_VLB, .flags = MACHINE_APM, .ram = { .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has AMI KF KBC firmware. */ - { - .name = "[ZyMOS Poach] Genoa Unknown 486", - .internal_name = "genoa486", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_ZYMOS_POACH, - .init = machine_at_genoa486_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET1, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, + .max = 65536, .step = 1024 }, .nvrmask = 127, @@ -7000,51 +6923,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has JetKey 5 KBC Firmware - but the BIOS string ends in a hardcoded -F, and - the BIOS also explicitly expects command A1 to return a 'F', so it looks like - the JetKey 5 is a clone of AMIKey type F. */ - { - .name = "[CS4031] AMI 486 CS4031", - .internal_name = "cs4031", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_CT_CS4031, - .init = machine_at_cs4031_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET1, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Uses some variant of Phoenix MultiKey/42 as the Intel 8242 chip has a Phoenix copyright. */ { @@ -7480,6 +7358,92 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* Has Award KBC firmware. */ + { + .name = "[ZyMOS Poach] ASUS ISA-486C", + .internal_name = "isa486c", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_ZYMOS_POACH, + .init = machine_at_isa486c_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET1, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has AMI KF KBC firmware. */ + { + .name = "[ZyMOS Poach] Genoa Unknown 486", + .internal_name = "genoa486", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_ZYMOS_POACH, + .init = machine_at_genoa486_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET1, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has IBM PS/2 Type 1 KBC firmware. */ { .name = "[MCA] IBM PS/2 model 70 (type 4)", @@ -8049,6 +8013,135 @@ const machine_t machines[] = { /* 486 machines - Socket 3 */ /* 486 machines with just the ISA slot */ + /* JETKey V5.0 */ + { + .name = "[ALi M1429G] A-Trend ATC-1762", + .internal_name = "atc1762", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_ALI_M1429G, + .init = machine_at_atc1762_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has an AMIKey-2, which is an updated version of type 'H'. */ + { + .name = "[ALi M1429G] ECS AL486", + .internal_name = "ecsal486", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_ALI_M1429G, + .init = machine_at_ecsal486_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 98304, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This uses a VIA VT82C42N KBC, which is a clone of type 'F' with additional commands */ + { + .name = "[ALi M1429G] Lanner Electronics AP-4100AA", + .internal_name = "ap4100aa", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_ALI_M1429G, + .init = machine_at_ap4100aa_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has a Fujitsu MBL8042H KBC. */ { .name = "[Contaq 82C596A] A-Trend 4GPV5", @@ -8438,6 +8531,49 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* Unknown revision phoenix 1993 multikey */ + { + .name = "[SiS 471] DEC Venturis 4xx", + .internal_name = "dvent4xx", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_SIS_471, + .init = machine_at_dvent4xx_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2, + .flags = MACHINE_IDE_DUAL | MACHINE_SUPER_IO | MACHINE_APM | MACHINE_VIDEO, + .ram = { + .min = 4096, + .max = 69632, + .step = 4096 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED, + .default_jumpered_ecp_dma = 4, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_phoenix_trio32_onboard_vlb_device, + .snd_device = NULL, + .net_device = NULL + }, /* Has JetKey 5 KBC Firmware which looks like it is a clone of AMIKey type F. */ { .name = "[SiS 471] DTK PKM-0038S E-2", @@ -8610,178 +8746,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Unknown revision phoenix 1993 multikey */ - { - .name = "[SiS 471] DEC Venturis 4xx", - .internal_name = "dvent4xx", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_SIS_471, - .init = machine_at_dvent4xx_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE_DUAL | MACHINE_SUPER_IO | MACHINE_APM | MACHINE_VIDEO, - .ram = { - .min = 4096, - .max = 69632, - .step = 4096 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED, - .default_jumpered_ecp_dma = 4, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &s3_phoenix_trio32_onboard_vlb_device, - .snd_device = NULL, - .net_device = NULL - }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { - .name = "[ALi M1429G] ECS AL486", - .internal_name = "ecsal486", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_ALI_M1429G, - .init = machine_at_ecsal486_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 98304, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This uses a VIA VT82C42N KBC, which is a clone of type 'F' with additional commands */ - { - .name = "[ALi M1429G] Lanner Electronics AP-4100AA", - .internal_name = "ap4100aa", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_ALI_M1429G, - .init = machine_at_ap4100aa_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* JETKey V5.0 */ - { - .name = "[ALi M1429G] A-Trend ATC-1762", - .internal_name = "atc1762", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_ALI_M1429G, - .init = machine_at_atc1762_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* 486 machines which utilize the PCI bus */ /* Machine with ALi M1429G chipset and M1435 southbridge */ @@ -8958,17 +8922,13 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has the ALi M1487/9's on-chip keyboard controller which clones a standard AT - KBC. - The BIOS string always ends in -U, but the BIOS will send AMIKey commands 0xCA - and 0xCB if command 0xA1 returns a letter in the 0x5x or 0x7x ranges, so I'm - going to give it an AMI 'U' KBC. */ + /* Has an ALi M5042 with phoenix firmware like the ESA TF-486. */ { - .name = "[ALi M1489] AMI WinBIOS 486 PCI", - .internal_name = "win486pci", + .name = "[ALi M1489] Acrosser AR-B1476", + .internal_name = "arb1476", .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1489, - .init = machine_at_win486pci_init, + .init = machine_at_arb1476_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -8983,16 +8943,16 @@ const machine_t machines[] = { .min_multi = 0, .max_multi = 0 }, - .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .bus_flags = MACHINE_PS2, + .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, /* Has onboard video: C&T F65545 */ .ram = { - .min = 1024, - .max = 65536, + .min = 8192, + .max = 73728, .step = 1024 }, .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, .kbc_p1 = 0xff, .gpio = 0xffffffff, @@ -9007,15 +8967,15 @@ const machine_t machines[] = { }, /* Has the ALi M1487/9's on-chip keyboard controller which clones a standard AT KBC. - The known BIOS string ends in -E, and the BIOS returns whatever command 0xA1 - returns (but only if command 0xA1 is instant response), so said ALi keyboard - controller likely returns 'E'. */ + The BIOS string always ends in -U, but the BIOS will send AMIKey commands 0xCA + and 0xCB if command 0xA1 returns a letter in the 0x5x or 0x7x ranges, so I'm + going to give it an AMI 'U' KBC. */ { - .name = "[ALi M1489] MSI MS-4145", - .internal_name = "ms4145", + .name = "[ALi M1489] AMI WinBIOS 486 PCI", + .internal_name = "win486pci", .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1489, - .init = machine_at_ms4145_init, + .init = machine_at_win486pci_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -9095,13 +9055,17 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has an ALi M5042 with phoenix firmware like the ESA TF-486. */ + /* Has the ALi M1487/9's on-chip keyboard controller which clones a standard AT + KBC. + The known BIOS string ends in -E, and the BIOS returns whatever command 0xA1 + returns (but only if command 0xA1 is instant response), so said ALi keyboard + controller likely returns 'E'. */ { - .name = "[ALi M1489] Acrosser AR-B1476", - .internal_name = "arb1476", + .name = "[ALi M1489] MSI MS-4145", + .internal_name = "ms4145", .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1489, - .init = machine_at_arb1476_init, + .init = machine_at_ms4145_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -9116,16 +9080,16 @@ const machine_t machines[] = { .min_multi = 0, .max_multi = 0 }, - .bus_flags = MACHINE_PS2, - .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, /* Has onboard video: C&T F65545 */ + .bus_flags = MACHINE_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, .ram = { - .min = 8192, - .max = 73728, + .min = 1024, + .max = 65536, .step = 1024 }, .nvrmask = 255, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, .kbc_p1 = 0xff, .gpio = 0xffffffff, @@ -9268,6 +9232,92 @@ const machine_t machines[] = { .net_device = NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ + { + .name = "[i420EX] Advanced Integration Research 486PI", + .internal_name = "486pi", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_INTEL_420EX, + .init = machine_at_486pi_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PCIV, + .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has Phoenix Multikey/42 PS/2 KBC, but unknown version */ + { + .name = "[i420EX] Anigma BAT4IP3e", + .internal_name = "bat4ip3e", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_INTEL_420EX, + .init = machine_at_bat4ip3e_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has an AMIKey-2, which is an updated version of type 'H'. */ { .name = "[i420EX] ASUS PVI-486AP4", .internal_name = "486ap4", @@ -9353,92 +9403,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has Phoenix Multikey/42 PS/2 KBC, but unknown version */ - { - .name = "[i420EX] Anigma BAT4IP3e", - .internal_name = "bat4ip3e", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_INTEL_420EX, - .init = machine_at_bat4ip3e_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { - .name = "[i420EX] Advanced Integration Research 486PI", - .internal_name = "486pi", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_INTEL_420EX, - .init = machine_at_486pi_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PCIV, - .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* absolutely no KBC info */ { .name = "[i420EX] ICS SB486P", @@ -9482,6 +9446,49 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* According to another string seen on the UH19 website, this has AMI 'H' KBC. */ + { + .name = "[i420TX] AMI Super Voyager PCI", + .internal_name = "amis76", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_INTEL_420TX, + .init = machine_at_amis76_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PCI, + .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* This has an AMIKey (and an on-board NCR 53C810 PCI SCSI controller), thanks, eBay! The keyboard port is AT. @@ -9571,49 +9578,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* According to another string seen on the UH19 website, this has AMI 'H' KBC. */ - { - .name = "[i420TX] AMI Super Voyager PCI", - .internal_name = "amis76", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_INTEL_420TX, - .init = machine_at_amis76_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PCI, - .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* This has an AMIKey-2, which is an updated version of type 'H'. Also has a SST 29EE010 Flash chip. */ { @@ -9916,6 +9880,49 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* AMIKEY-2 */ + { + .name = "[SiS 496] MSI MS-4144", + .internal_name = "ms4144", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_SIS_496, + .init = machine_at_ms4144_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PCI, + .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 5120, /* Hack: machine seems to break with less than 5 MBs of RAM */ + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Revision 1 has a Lance LT38C41L, revision 2 has a Holtek HT6542B. Another variant with a Bestkey KBC might exist as well. */ { .name = "[SiS 496] Rise Computer R418", @@ -10047,49 +10054,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* AMIKEY-2 */ - { - .name = "[SiS 496] MSI MS-4144", - .internal_name = "ms4144", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_SIS_496, - .init = machine_at_ms4144_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PCI, - .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 5120, /* Hack: machine seems to break with less than 5 MBs of RAM */ - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* This has the UMC 88xx on-chip KBC. */ { .name = "[UMC 8881] A-Trend ATC-1415", @@ -10177,6 +10141,50 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* Compaq Presario 7100 / 7200 Series, using MiTAC/Trigon PL4600C (486). */ + /* Has a VIA VT82C42N KBC. */ + { + .name = "[UMC 8881] Compaq Presario 7100/7200 Series 486", + .internal_name = "pl4600c", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_UMC_UM8881, + .init = machine_at_pl4600c_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, + .step = 1024 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &gd5430_onboard_pci_device, + .snd_device = &ess_1688_device, + .net_device = NULL + }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ { .name = "[UMC 8881] ECS Elite UM8810P-AIO", @@ -10437,50 +10445,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Compaq Presario 7100 / 7200 Series, using MiTAC/Trigon PL4600C (486). */ - /* Has a VIA VT82C42N KBC. */ - { - .name = "[UMC 8881] Compaq Presario 7100/7200 Series 486", - .internal_name = "pl4600c", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_UMC_UM8881, - .init = machine_at_pl4600c_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &gd5430_onboard_pci_device, - .snd_device = &ess_1688_device, - .net_device = NULL - }, /* Has a VIA VT82C406 KBC+RTC that likely has identical commands to the VT82C42N. */ { .name = "[VIA VT82C496G] DFI G486VPA", @@ -10879,6 +10843,51 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* This has the Phoenix MultiKey KBC firmware. + This is basically an Intel Batman (*NOT* Batman's Revenge) with a fancier + POST screen */ + { + .name = "[i430LX] AMBRA DP60 PCI", + .internal_name = "ambradp60", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_ambradp60_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET4, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, + .min_voltage = 5000, + .max_voltage = 5000, + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has AMIKey H KBC firmware (AMIKey-2), per POST screen with BIOS string shown in the manual. Has PS/2 mouse support with serial-style (DB9) connector. @@ -11055,15 +11064,13 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* This has the Phoenix MultiKey KBC firmware. - This is basically an Intel Batman (*NOT* Batman's Revenge) with a fancier - POST screen */ + /* Has AMI MegaKey 'H' KBC firmware. */ { - .name = "[i430LX] AMBRA DP60 PCI", - .internal_name = "ambradp60", + .name = "[i430LX] Gigabyte GA-586IS", + .internal_name = "586is", .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_ambradp60_init, + .init = machine_at_586is_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -11078,8 +11085,8 @@ const machine_t machines[] = { .min_multi = MACHINE_MULTIPLIER_FIXED, .max_multi = MACHINE_MULTIPLIER_FIXED }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_APM, + .bus_flags = MACHINE_PCI, + .flags = MACHINE_APM, .ram = { .min = 2048, .max = 131072, @@ -11186,92 +11193,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has AMI MegaKey 'H' KBC firmware. */ - { - .name = "[i430LX] Gigabyte GA-586IS", - .internal_name = "586is", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_586is_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET4, - .block = CPU_BLOCK_NONE, - .min_bus = 60000000, - .max_bus = 66666667, - .min_voltage = 5000, - .max_voltage = 5000, - .min_multi = MACHINE_MULTIPLIER_FIXED, - .max_multi = MACHINE_MULTIPLIER_FIXED - }, - .bus_flags = MACHINE_PCI, - .flags = MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This has the Phoenix MultiKey KBC firmware. */ - { - .name = "[i430LX] Packard Bell PB520R", - .internal_name = "pb520r", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_pb520r_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET4, - .block = CPU_BLOCK_NONE, - .min_bus = 60000000, - .max_bus = 66666667, - .min_voltage = 5000, - .max_voltage = 5000, - .min_multi = MACHINE_MULTIPLIER_FIXED, - .max_multi = MACHINE_MULTIPLIER_FIXED - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 8192, - .max = 139264, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &gd5434_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL - }, /* The M5Pi appears to have a Phoenix MultiKey KBC firmware according to photos. */ { .name = "[i430LX] Micronics M5Pi", @@ -11315,6 +11236,49 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* This has the Phoenix MultiKey KBC firmware. */ + { + .name = "[i430LX] Packard Bell PB520R", + .internal_name = "pb520r", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_pb520r_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET4, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, + .min_voltage = 5000, + .max_voltage = 5000, + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 8192, + .max = 139264, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &gd5434_onboard_pci_device, + .snd_device = NULL, + .net_device = NULL + }, /* OPTi 596/597 */ /* This uses an AMI KBC firmware in PS/2 mode (it sends command A5 with the @@ -11540,134 +11504,6 @@ const machine_t machines[] = { }, /* Socket 5 machines */ /* 430NX */ - /* This has the Phoenix MultiKey KBC firmware. */ - { - .name = "[i430NX] Intel Premiere/PCI II (Plato)", - .internal_name = "plato", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_plato_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3520, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Same as Intel Premiere PCI/II, but with a Dell OEM BIOS */ - { - .name = "[i430NX] Dell Dimension XPS Pxxx", - .internal_name = "dellplato", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_dellplato_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3520, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - { - .name = "[i430NX] Siemens-Nixdorf D842", - .internal_name = "d842", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_d842_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 = 50000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 2.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, /* Machine has onboard video: TLI ET4000/w32p */ - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = &d842_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* This has the Phoenix MultiKey KBC firmware. This is basically an Intel Premiere/PCI II with a fancier POST screen. */ { @@ -11755,6 +11591,49 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* Same as Intel Premiere PCI/II, but with a Dell OEM BIOS */ + { + .name = "[i430NX] Dell Dimension XPS Pxxx", + .internal_name = "dellplato", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430NX, + .init = machine_at_dellplato_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3520, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 1.5 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has AMI 'H' KBC firmware. */ { .name = "[i430NX] Gigabyte GA-586IP", @@ -11798,6 +11677,91 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* This has the Phoenix MultiKey KBC firmware. */ + { + .name = "[i430NX] Intel Premiere/PCI II (Plato)", + .internal_name = "plato", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430NX, + .init = machine_at_plato_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3520, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 1.5 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + { + .name = "[i430NX] Siemens-Nixdorf D842", + .internal_name = "d842", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430NX, + .init = machine_at_d842_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 = 50000000, + .max_bus = 66666667, + .min_voltage = 3380, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 2.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, /* Machine has onboard video: TLI ET4000/w32p */ + .ram = { + .min = 2048, + .max = 131072, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &d842_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has AMI MegaKey KBC firmware. */ { .name = "[i430NX] Teknor TEK-932", @@ -11972,6 +11936,49 @@ const machine_t machines[] = { .snd_device = &sb_vibra16s_onboard_device, .net_device = NULL /* not yet emulated */ }, + /* KBC On-Chip the VT82C406MV. */ + { + .name = "[i430FX] FIC PT-2000", + .internal_name = "pt2000", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_pt2000_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 = 50000000, + .max_bus = 66666667, + .min_voltage = 3380, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 2.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_USE_MBDMA, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ @@ -12103,13 +12110,14 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* KBC On-Chip the VT82C406MV. */ + + /* OPTi 596/597 */ { - .name = "[i430FX] FIC PT-2000", - .internal_name = "pt2000", + .name = "[OPTi 597] Northgate Computer Systems Elegance Pentium 90", + .internal_name = "ncselp90", .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_pt2000_init, + .chipset = MACHINE_CHIPSET_OPTI_547_597, + .init = machine_at_ncselp90_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -12119,21 +12127,21 @@ const machine_t machines[] = { .block = CPU_BLOCK_NONE, .min_bus = 50000000, .max_bus = 66666667, - .min_voltage = 3380, + .min_voltage = 3520, .max_voltage = 3520, .min_multi = 1.5, .max_multi = 2.0 }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .bus_flags = MACHINE_PS2_PCIV, + .flags = MACHINE_APM | MACHINE_IDE_DUAL | MACHINE_SUPER_IO, .ram = { .min = 8192, .max = 131072, .step = 8192 }, .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_USE_MBDMA, - .default_jumpered_ecp_dma = -1, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, .kbc_p1 = 0xff, .gpio = 0xffffffff, @@ -12146,55 +12154,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - - /* OPTi 596/597 */ - /* This uses an AMI KBC firmware in PS/2 mode (it sends command A5 with the - PS/2 "Load Security" meaning), most likely MegaKey as it sends command AF - (Set Extended Controller RAM) just like the later Intel AMI BIOS'es. */ - { - .name = "[OPTi 597] TMC PAT54PV", - .internal_name = "pat54pv", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_OPTI_547_597, - .init = machine_at_pat54pv_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3520, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 2048, - .max = 65536, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - - /* OPTi 596/597/822 */ { .name = "[OPTi 597] Shuttle HOT-543", .internal_name = "hot543", @@ -12237,36 +12196,39 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* This uses an AMI KBC firmware in PS/2 mode (it sends command A5 with the + PS/2 "Load Security" meaning), most likely MegaKey as it sends command AF + (Set Extended Controller RAM) just like the later Intel AMI BIOS'es. */ { - .name = "[OPTi 597] Northgate Computer Systems Elegance Pentium 90", - .internal_name = "ncselp90", + .name = "[OPTi 597] TMC PAT54PV", + .internal_name = "pat54pv", .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_OPTI_547_597, - .init = machine_at_ncselp90_init, + .init = machine_at_pat54pv_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, + .block = CPU_BLOCK(CPU_K5, CPU_5K86), .min_bus = 50000000, .max_bus = 66666667, .min_voltage = 3520, .max_voltage = 3520, .min_multi = 1.5, - .max_multi = 2.0 + .max_multi = 1.5 }, - .bus_flags = MACHINE_PS2_PCIV, - .flags = MACHINE_APM | MACHINE_IDE_DUAL | MACHINE_SUPER_IO, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, .ram = { - .min = 8192, - .max = 131072, - .step = 8192 + .min = 2048, + .max = 65536, + .step = 2048 }, .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, .kbc_p1 = 0xff, .gpio = 0xffffffff, @@ -12455,7 +12417,7 @@ const machine_t machines[] = { }, /* Has AMIKey Z(!) KBC firmware. */ { - .name = "[SiS 5501] TriGem Torino", + .name = "[SiS 5501] Olivetti (TriGem) Torino", .internal_name = "torino", .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_SIS_5501, @@ -13204,7 +13166,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - { .name = "[i430HX] Siemens-Nixdorf D943", .internal_name = "d943", @@ -13340,6 +13301,49 @@ const machine_t machines[] = { }, /* SiS 5511 */ + /* Has Megakey 'R' KBC */ + { + .name = "[SiS 5511] AMI Atlas PCI-II", + .internal_name = "amis727", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_SIS_5511, + .init = machine_at_amis727_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 = 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 | MACHINE_APM, + .ram = { + .min = 8192, + .max = 524288, + .step = 8192 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has AMIKey H KBC firmware (AMIKey-2). */ { .name = "[SiS 5511] AOpen AP5S", @@ -13469,49 +13473,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has Megakey 'R' KBC */ - { - .name = "[SiS 5511] AMI Atlas PCI-II", - .internal_name = "amis727", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_SIS_5511, - .init = machine_at_amis727_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 = 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 | MACHINE_APM, - .ram = { - .min = 8192, - .max = 524288, - .step = 8192 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Socket 7 (Dual Voltage) machines */ /* 430HX */ @@ -13645,38 +13606,38 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has a SM(S)C FDC37C935 Super I/O chip with on-chip KBC with Phoenix - MultiKey/42 (version 1.38) KBC firmware. */ + /* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ { - .name = "[i430HX] Micronics M7S-Hi", - .internal_name = "m7shi", + .name = "[i430HX] Intel CU430HX (Cumberland)", + .internal_name = "cu430hx", .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_m7shi_init, + .init = machine_at_cu430hx_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, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, + CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), + .min_bus = 50000000, .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, .min_multi = 1.5, - .max_multi = 3.0 + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_USB, /* Machine has internal video: ATI Mach64GT 3D Rage and internal NIC: Intel 82557 */ .ram = { - .min = 4096, + .min = 8192, .max = 524288, .step = 4096 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, .kbc_p1 = 0xff, .gpio = 0xffffffff, @@ -13686,7 +13647,7 @@ const machine_t machines[] = { .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, - .snd_device = NULL, + .snd_device = &sb_vibra16c_onboard_device, .net_device = NULL }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the @@ -13735,38 +13696,38 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* OEM version of Intel TC430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ + /* Has a SM(S)C FDC37C935 Super I/O chip with on-chip KBC with Phoenix + MultiKey/42 (version 1.38) KBC firmware. */ { - .name = "[i430HX] Toshiba Infinia 7201", - .internal_name = "infinia7200", + .name = "[i430HX] Micronics M7S-Hi", + .internal_name = "m7shi", .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_infinia7200_init, + .init = machine_at_m7shi_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, .cpu = { .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 50000000, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, .min_multi = 1.5, - .max_multi = 3.5 + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal sound: Yamaha YMF701-S */ + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, .ram = { - .min = 8192, + .min = 4096, .max = 524288, .step = 4096 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, + .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, .kbc_p1 = 0xff, .gpio = 0xffffffff, @@ -13775,98 +13736,10 @@ const machine_t machines[] = { .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, - .vid_device = &s3_virge_375_pci_device, + .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ - { - .name = "[i430HX] Intel CU430HX (Cumberland)", - .internal_name = "cu430hx", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_cu430hx_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 2800, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_USB, /* Machine has internal video: ATI Mach64GT 3D Rage and internal NIC: Intel 82557 */ - .ram = { - .min = 8192, - .max = 524288, - .step = 4096 - }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &sb_vibra16c_onboard_device, - .net_device = NULL - }, - /* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ - { - .name = "[i430HX] Toshiba Equium 5200D", - .internal_name = "equium5200", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_equium5200_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 2800, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_USB, /* Machine has internal video: ATI Mach64GT 3D Rage and internal NIC: Intel 82557 */ - .ram = { - .min = 8192, - .max = 524288, - .step = 4096 - }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &sb_vibra16c_onboard_device, - .net_device = NULL - }, /* Unknown PS/2 KBC. */ { .name = "[i430HX] Radisys EPC-2102", @@ -14001,6 +13874,94 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ + { + .name = "[i430HX] Toshiba Equium 5200D", + .internal_name = "equium5200", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_equium5200_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, + CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 2800, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.5 + }, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_USB, /* Machine has internal video: ATI Mach64GT 3D Rage and internal NIC: Intel 82557 */ + .ram = { + .min = 8192, + .max = 524288, + .step = 4096 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = &sb_vibra16c_onboard_device, + .net_device = NULL + }, + /* OEM version of Intel TC430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ + { + .name = "[i430HX] Toshiba Infinia 7201", + .internal_name = "infinia7200", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_infinia7200_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, + CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 2800, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.5 + }, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, + .flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal sound: Yamaha YMF701-S */ + .ram = { + .min = 8192, + .max = 524288, + .step = 4096 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_virge_375_pci_device, + .snd_device = NULL, + .net_device = NULL + }, /* 430VX */ /* This has the VIA VT82C42N or Holtek HT6542B KBC. */ @@ -15998,6 +15959,50 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* Has the VIA VT82C596A southbridge with on-chip KBC identical to the VIA + VT82C42N. Sadly likely abuses cache on Cyrix 6x86MX and MII CPUs (Cyrix MII being what most socket 7 eMachines PCs used) , so they are blocked and it's thus named after the only known eMachines with an AMD K6-2 CPU here */ + { + .name = "[VIA MVP3] eMachines eTower 300k", + .internal_name = "delhi3", + .type = MACHINE_TYPE_SOCKETS7, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, + .init = machine_at_delhi3_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_Cx6x86MX), + .min_bus = 66666667, + .max_bus = 124242424, + .min_voltage = 2000, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 5.5 + }, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, /* Has internal video: ATI 3D Rage IIc AGP (Rage 2) */ + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_SOUND | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = &cs4235_onboard_device, + .net_device = NULL + }, /* Has the VIA VT82C586B southbridge with on-chip KBC identical to the VIA VT82C42N. */ { @@ -16130,50 +16135,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has the VIA VT82C596A southbridge with on-chip KBC identical to the VIA - VT82C42N. Sadly likely abuses cache on Cyrix 6x86MX and MII CPUs (Cyrix MII being what most socket 7 eMachines PCs used) , so they are blocked and it's thus named after the only known eMachines with an AMD K6-2 CPU here */ - { - .name = "[VIA MVP3] eMachines eTower 300k", - .internal_name = "delhi3", - .type = MACHINE_TYPE_SOCKETS7, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, - .init = machine_at_delhi3_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_Cx6x86MX), - .min_bus = 66666667, - .max_bus = 124242424, - .min_voltage = 2000, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 5.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, /* Has internal video: ATI 3D Rage IIc AGP (Rage 2) */ - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_SOUND | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, - .step = 8192 - }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &cs4235_onboard_device, - .net_device = NULL - }, /* SiS 5591 */ /* Has the SiS 5591 chipset with on-chip KBC. */ @@ -16308,6 +16269,49 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* This has a PC87306 with unknown keyboard controller firmware (Phoenix?). */ + { + .name = "[i450KX] FIC PO-6000", + .internal_name = "ficpo6000", + .type = MACHINE_TYPE_SOCKET8, + .chipset = MACHINE_CHIPSET_INTEL_450KX, + .init = machine_at_ficpo6000_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET8, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, + .min_voltage = 2100, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 8.0 + }, + .bus_flags = MACHINE_PS2_PCI, /* Machine has AMB */ + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 524288, + .step = 8192 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_1, + .default_jumpered_ecp_dma = 1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &ficpo6000_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* 440FX */ /* Has a SM(S)C FDC37C935 Super I/O chip with on-chip KBC with Phoenix @@ -16791,7 +16795,7 @@ const machine_t machines[] = { }, /* Slot 1 machines */ - /* ALi ALADDiN V */ + /* ALi ALADDiN-PRO II */ /* Has the ALi M1543C southbridge with on-chip KBC. */ { .name = "[ALi ALADDiN-PRO II] PC Chips M729", @@ -17194,6 +17198,138 @@ const machine_t machines[] = { }, /* 440BX */ + /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC + firmware. */ + { + .name = "[i440BX] ABIT BF6", + .internal_name = "bf6", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_bf6_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 133333333, + .min_voltage = 1800, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 8.0 + }, + .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC + firmware. */ + { + .name = "[i440BX] ABIT BX6", + .internal_name = "bx6", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_bx6_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 133333333, + .min_voltage = 1500, + .max_voltage = 3500, + .min_multi = 2.0, + .max_multi = 5.5 + }, + .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC + firmware. */ + { + .name = "[i440BX] AOpen AX6BC", + .internal_name = "ax6bc", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_ax6bc_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 112121212, + .min_voltage = 1800, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 8.0 + }, + .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { @@ -17282,138 +17418,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC - firmware. */ - { - .name = "[i440BX] ABIT BX6", - .internal_name = "bx6", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_bx6_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SLOT1, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 133333333, - .min_voltage = 1500, - .max_voltage = 3500, - .min_multi = 2.0, - .max_multi = 5.5 - }, - .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, - .step = 8192 - }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC - firmware. */ - { - .name = "[i440BX] ABIT BF6", - .internal_name = "bf6", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_bf6_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SLOT1, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 133333333, - .min_voltage = 1800, - .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 - }, - .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, - .step = 8192 - }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC - firmware. */ - { - .name = "[i440BX] AOpen AX6BC", - .internal_name = "ax6bc", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_ax6bc_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SLOT1, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 112121212, - .min_voltage = 1800, - .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 - }, - .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, - .step = 8192 - }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { @@ -18403,50 +18407,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC - firmware. */ - { - .name = "[i440BX] ASUS CUBX", - .internal_name = "cubx", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_cubx_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET370, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 150000000, - .min_voltage = 1300, - .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 - }, - .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_QUAD | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has quad channel IDE with internal controller: CMD PCI-0648 */ - .ram = { - .min = 8192, - .max = 1048576, - .step = 8192 - }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { @@ -18491,6 +18451,50 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC + firmware. */ + { + .name = "[i440BX] ASUS CUBX", + .internal_name = "cubx", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_cubx_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET370, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 150000000, + .min_voltage = 1300, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 8.0 + }, + .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, + .flags = MACHINE_IDE_QUAD | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has quad channel IDE with internal controller: CMD PCI-0648 */ + .ram = { + .min = 8192, + .max = 1048576, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* 440ZX */ /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC diff --git a/src/sio/CMakeLists.txt b/src/sio/CMakeLists.txt index c6e90d320..3fb1eda66 100644 --- a/src/sio/CMakeLists.txt +++ b/src/sio/CMakeLists.txt @@ -19,6 +19,7 @@ add_library(sio OBJECT sio_82091aa.c sio_acc3221.c sio_ali5123.c + sio_cbm_io.c sio_gm82c803ab.c sio_gm82c803c.c sio_f82c606.c diff --git a/src/sio/sio_cbm_io.c b/src/sio/sio_cbm_io.c new file mode 100644 index 000000000..477c30a44 --- /dev/null +++ b/src/sio/sio_cbm_io.c @@ -0,0 +1,112 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of the ACC 3221-SP Super I/O Chip. + * + * + * + * Authors: Sarah Walker, + * + * Copyright 2019 Sarah Walker. + */ +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/device.h> +#include <86box/pci.h> +#include <86box/lpt.h> +#include <86box/serial.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/sio.h> +#include <86box/plat_unused.h> + +typedef struct cbm_io_t { + serial_t *uart; + lpt_t *lpt; +} cbm_io_t; + +static void +cbm_io_write(UNUSED(uint16_t port), uint8_t val, void *priv) +{ + cbm_io_t *dev = (cbm_io_t *) priv; + + lpt_port_remove(dev->lpt); + + switch (val & 0x03) { + case 0x01: + lpt_port_setup(dev->lpt, LPT_MDA_ADDR); + break; + case 0x02: + lpt_port_setup(dev->lpt, LPT1_ADDR); + break; + case 0x03: + lpt_port_setup(dev->lpt, LPT2_ADDR); + break; + + default: + break; + } + + switch (val & 0x0c) { + case 0x04: + serial_setup(dev->uart, COM2_ADDR, COM2_IRQ); + break; + case 0x08: + serial_setup(dev->uart, COM1_ADDR, COM1_IRQ); + break; + + default: + break; + } +} + +static void +cbm_io_close(void *priv) +{ + cbm_io_t *dev = (cbm_io_t *) priv; + + free(dev); +} + +static void * +cbm_io_init(UNUSED(const device_t *info)) +{ + cbm_io_t *dev = (cbm_io_t *) calloc(1, sizeof(cbm_io_t)); + + dev->uart = device_add_inst(&ns16450_device, 1); + + dev->lpt = device_add_inst(&lpt_port_device, 1); + + io_sethandler(0x0230, 0x0001, + NULL, NULL, NULL, cbm_io_write, NULL, NULL, + dev); + + return dev; +} + +const device_t cbm_io_device = { + .name = "Commodore CBM I/O", + .internal_name = "cbm_io", + .flags = 0, + .local = 0, + .init = cbm_io_init, + .close = cbm_io_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +};