From 2b02287ef3bcda8737aeae5a0347035ed5d7d09f Mon Sep 17 00:00:00 2001 From: luennix Date: Fri, 3 Feb 2023 09:34:17 +0300 Subject: [PATCH 1/4] Unfinished Packard Bell PB810 work, currently breaks compile --- src/include/86box/machine.h | 1 + src/machine/m_at_socket7.c | 34 ++++++++++++++++++++++++++++++++++ src/machine/machine_table.c | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 96d76b097..2f976bcac 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -613,6 +613,7 @@ extern int machine_at_presario4500_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 *); diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index 899ce8f5a..34e54a9ee 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -531,6 +531,40 @@ machine_at_pb680_init(const machine_t *model) return ret; } +int +machine_at_pb810_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pb810/G400125I.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(0x13, PCI_CARD_NORMAL, 2, 1, 3, 4); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 3, 2, 4); + pci_register_slot(0x0b, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (gfxcard == VID_INTERNAL) + device_add(&s3_phoenix_trio64vplus_onboard_pci_device); + if (soundcard == SOUND_INTERNAL) + device_add(&cs4237b_device); + + device_add(&i430vx_device); + device_add(&piix3_device); + device_add(&keyboard_ps2_device); + device_add(&fdc37c935_device); + device_add(&intel_flash_bxt_device); + + return ret; +} + int machine_at_mb520n_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 5bdd5b948..1d00f8287 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -9449,6 +9449,43 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* This machine has Phoenix MultiKey/42i KBC */ + { + .name = "[i430VX] Packard Bell PB810", + .internal_name = "pb810", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_pb810_init, + .pad = 0, + .pad0 = 0, + .pad1 = MACHINE_AVAILABLE, + .pad2 = 0, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 2500, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_AV, + .ram = { + .min = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 127, + .kbc = KBC_UNKNOWN, + .kbc_p1 = 0, + .gpio = 0, + .device = &s3_phoenix_trio64vplus_onboard_pci_device, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* This has the AMIKey 'H' firmware, possibly AMIKey-2. Photos show it with a BestKey, so it likely clones the behavior of AMIKey 'H'. */ { From 194ed138d7691020b66e95e20f270312b83c839e Mon Sep 17 00:00:00 2001 From: luennix Date: Fri, 3 Feb 2023 10:24:11 +0300 Subject: [PATCH 2/4] Add Packard Bell PB810 (without on-board video, for now) --- src/machine/m_at_socket7.c | 5 ++--- src/machine/machine_table.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index 34e54a9ee..f7faae167 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -35,6 +35,7 @@ #include <86box/keyboard.h> #include <86box/flash.h> #include <86box/sio.h> +#include <86box/sound.h> #include <86box/hwm.h> #include <86box/video.h> #include <86box/spd.h> @@ -551,9 +552,7 @@ machine_at_pb810_init(const machine_t *model) pci_register_slot(0x0b, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - if (gfxcard == VID_INTERNAL) - device_add(&s3_phoenix_trio64vplus_onboard_pci_device); - if (soundcard == SOUND_INTERNAL) + if (sound_card_current[0] == SOUND_INTERNAL) device_add(&cs4237b_device); device_add(&i430vx_device); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 1d00f8287..bc993c913 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -9471,7 +9471,7 @@ const machine_t machines[] = { .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_AV, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND, .ram = { .min = 8192, .max = 131072, @@ -9481,7 +9481,7 @@ const machine_t machines[] = { .kbc = KBC_UNKNOWN, .kbc_p1 = 0, .gpio = 0, - .device = &s3_phoenix_trio64vplus_onboard_pci_device, + .device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL From c56dce0fc506af7968c8d6a988dd3d6f20e62fa9 Mon Sep 17 00:00:00 2001 From: luennix Date: Sat, 4 Feb 2023 12:01:59 +0300 Subject: [PATCH 3/4] Fix ECS P6BAP's IRQ steering table --- src/machine/m_at_socket370.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/machine/m_at_socket370.c b/src/machine/m_at_socket370.c index 422e2c989..70527e076 100644 --- a/src/machine/m_at_socket370.c +++ b/src/machine/m_at_socket370.c @@ -127,13 +127,13 @@ machine_at_p6bap_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, 0, 0); - pci_register_slot(0x14, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x12, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 3, 5); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 5); + pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 5, 1); + pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 5, 1, 2); + pci_register_slot(0x0c, PCI_CARD_NORMAL, 5, 1, 2, 3); + pci_register_slot(0x0d, PCI_CARD_NORMAL, 5, 3, 2, 1); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 5); device_add(&via_apro133a_device); /* Rebranded as ET82C693A */ device_add(&via_vt82c596b_device); /* Rebranded as ET82C696B */ device_add(&w83977ef_device); From f0c0ad130d9bbf6584901fd0a870da4c6acf128a Mon Sep 17 00:00:00 2001 From: luennix Date: Sat, 4 Feb 2023 12:13:32 +0300 Subject: [PATCH 4/4] Revert "Fix ECS P6BAP's IRQ steering table" This reverts commit c56dce0fc506af7968c8d6a988dd3d6f20e62fa9. --- src/machine/m_at_socket370.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/machine/m_at_socket370.c b/src/machine/m_at_socket370.c index 70527e076..422e2c989 100644 --- a/src/machine/m_at_socket370.c +++ b/src/machine/m_at_socket370.c @@ -127,13 +127,13 @@ machine_at_p6bap_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, 3, 5); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 5); - pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 5, 1); - pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 5, 1, 2); - pci_register_slot(0x0c, PCI_CARD_NORMAL, 5, 1, 2, 3); - pci_register_slot(0x0d, PCI_CARD_NORMAL, 5, 3, 2, 1); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 5); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 0, 0); + pci_register_slot(0x14, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x12, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 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(&w83977ef_device);