From b36b0c4ea008bd6cf8b69b97b6e5be8955fed428 Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Fri, 14 Nov 2025 22:17:19 -0600 Subject: [PATCH 1/5] Add the HP Pavilion 50x0/70xx (Morrison32) --- src/include/86box/machine.h | 1 + src/machine/m_at_socket5.c | 73 +++++++++++++++++++++++++++++++++++++ src/machine/machine_table.c | 46 +++++++++++++++++++++++ 3 files changed, 120 insertions(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 0ba5b6f9c..4003ce81e 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -926,6 +926,7 @@ extern int machine_at_optiplexgxl_init(const machine_t *); extern const device_t pt2000_device; #endif extern int machine_at_pt2000_init(const machine_t *); +extern int machine_at_morrison32_init(const machine_t *); extern int machine_at_pc330_65x6_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t zappa_device; diff --git a/src/machine/m_at_socket5.c b/src/machine/m_at_socket5.c index 50a28a9c8..a049600e3 100644 --- a/src/machine/m_at_socket5.c +++ b/src/machine/m_at_socket5.c @@ -427,6 +427,79 @@ machine_at_optiplexgxl_init(const machine_t *model) return ret; } + +static void +machine_at_morrison32_gpio_init(void) +{ + uint32_t gpio = 0xffffe2ff; + + /* 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 = No onboard audio, 1 = Onboard audio present. */ + /* Bit 1: 0 = Soft Off capable power supply, 1 = Standard power supply. */ + /* Bit 0: 2x multiplier, 1 = 1.5x multiplier (Switch 6). */ + /* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */ + if (cpu_busspeed <= 50000000) + gpio |= 0xffff00ff; + else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000)) + gpio |= 0xffff08ff; + else if (cpu_busspeed > 60000000) + gpio |= 0xffff10ff; + + if (cpu_dmulti <= 1.5) + gpio |= 0xffff01ff; + else + gpio |= 0xffff00ff; + + if (sound_card_current[0] == SOUND_INTERNAL) + gpio |= 0xffff04ff; + + machine_set_gpio_default(gpio); +} + +int +machine_at_morrison32_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/morrison32/1011BT0L.BIO", + "roms/machines/morrison32/1011BT0L.BI1", + 0x20000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + machine_at_morrison32_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(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + if (sound_card_current[0] == SOUND_INTERNAL) + machine_snd = device_add(machine_get_snd_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); + + return ret; +} + /* Some stuff taken from Monaco */ static void machine_at_morrison64_gpio_init(void) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index a60acfdc8..98ec1cc7e 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -12474,6 +12474,52 @@ const machine_t machines[] = { .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 . */ + { + .name = "[i430FX] HP Pavilion 50x0/70xx (Morrison32)", + .internal_name = "morrison32", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_morrison32_init, + .p1_handler = machine_generic_p1_handler, + .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 = 3380, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 2.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_GAMEPORT | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_phoenix_trio32_onboard_pci_device, + .snd_device = &cs4232_onboard_device, + .net_device = NULL + }, { .name = "[i430FX] IBM PC 3x0 (type 65x6) (Morrison64)", .internal_name = "pc330_65x6", From 4a2b0753aa995181b8bb7e78870eb75d2b07b5d1 Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Fri, 14 Nov 2025 22:30:34 -0600 Subject: [PATCH 2/5] Add the HP Pavilion 51xx/7070/7090/71xx (Holly) --- src/include/86box/machine.h | 1 + src/machine/m_at_socket7_3v.c | 71 +++++++++++++++++++++++++++++++++++ src/machine/machine_table.c | 56 ++++++++++++++++++++++++--- 3 files changed, 123 insertions(+), 5 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 4003ce81e..d4ba99f51 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -971,6 +971,7 @@ extern const device_t p54tp4xe_device; #endif extern int machine_at_p54tp4xe_init(const machine_t *); extern int machine_at_exp8551_init(const machine_t *); +extern int machine_at_hpholly_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t vectra52_device; #endif diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index 28c75bacb..b85025cc9 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -157,6 +157,77 @@ machine_at_exp8551_init(const machine_t *model) return ret; } +static void +machine_at_hpholly_gpio_init(void) +{ + uint32_t gpio = 0xffffe2ff; + + /* 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 = 2.5x multiplier, 1 = 1.5x/2x multiplier. */ + /* Bit 1: 0 = Soft Off capable power supply, 1 = Standard power supply. */ + /* Bit 0: 2x multiplier, 1 = 1.5x multiplier (Switch 6). */ + /* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */ + if (cpu_busspeed <= 50000000) + gpio |= 0xffff00ff; + else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000)) + gpio |= 0xffff08ff; + else if (cpu_busspeed > 60000000) + gpio |= 0xffff10ff; + + if (cpu_dmulti <= 1.5) + gpio |= 0xffff0500; + else if ((cpu_dmulti > 1.5) && (cpu_dmulti <= 2.0)) + gpio |= 0xffff0400; + else + gpio |= 0xffff0000; + + machine_set_gpio_default(gpio); +} + +int +machine_at_hpholly_init(const machine_t *model) /* HP Pavilion Holly, 7070/7090/5100/7100 */ +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/hpholly/1005CA2L.BIO", + "roms/machines/hpholly/1005CA2L.BI1", + 0x20000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + machine_at_hpholly_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(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + if (sound_card_current[0] == SOUND_INTERNAL) + machine_snd = device_add(machine_get_snd_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); + + return ret; +} + static void machine_at_vectra52_gpio_init(void) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 98ec1cc7e..3d66fa9fc 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -13422,7 +13422,53 @@ const machine_t machines[] = { .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 . */ + { + .name = "[i430FX] HP Pavilion 51xx/7070/7090/71xx (Holly)", + .internal_name = "hpholly", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_hpholly_init, + .p1_handler = machine_generic_p1_handler, + .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 = 3380, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 2.5 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_GAMEPORT | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_phoenix_trio64vplus_onboard_pci_device, + .snd_device = &cs4232_onboard_device, + .net_device = NULL + }, + { .name = "[i430FX] HP Vectra 500 Series xxx/MT", .internal_name = "vectra500mt", .type = MACHINE_TYPE_SOCKET7_3V, @@ -13450,7 +13496,7 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 511, - .jumpered_ecp_dma = 0, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, .kbc_device = NULL, .kbc_params = 0x00000000, @@ -13458,7 +13504,7 @@ const machine_t machines[] = { .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, - .kbd_device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &s3_phoenix_trio64_onboard_pci_device, @@ -13493,7 +13539,7 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, - .jumpered_ecp_dma = 0, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, .kbc_device = NULL, .kbc_params = 0x00000000, @@ -13501,7 +13547,7 @@ const machine_t machines[] = { .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &vectra52_device, - .kbd_device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5436_onboard_pci_device, From c9e0a3c942c2f2d8847f086e86eb241e3c5fd440 Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Fri, 14 Nov 2025 22:37:41 -0600 Subject: [PATCH 3/5] Add the HP Pavilion 72xx (Ruby) --- src/include/86box/machine.h | 1 + src/machine/m_at_socket7_3v.c | 67 +++++++++++++++++++++++++++++++++++ src/machine/machine_table.c | 46 ++++++++++++++++++++++++ 3 files changed, 114 insertions(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index d4ba99f51..1dc5fecbd 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -1006,6 +1006,7 @@ extern int machine_at_fmb_init(const machine_t *); 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 *); +extern int machine_at_hpruby_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t d943_device; #endif diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index b85025cc9..d14e529a9 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -1229,6 +1229,73 @@ machine_at_8500tuc_init(const machine_t *model) return ret; } +static void +machine_at_ruby_gpio_init(void) +{ + uint32_t gpio = 0xffffe3ff; + + /* 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; + + if (sound_card_current[0] == SOUND_INTERNAL) + gpio |= 0xffff04ff; + + machine_set_gpio_default(gpio); +} + +int +machine_at_hpruby_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/hpruby/1007DC0L.BIO", + "roms/machines/hpruby/1007DC0L.BI1", + 0x20000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + machine_at_ruby_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(0x11, PCI_CARD_NORMAL, 1, 3, 2, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 3, 4); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + if (sound_card_current[0] == SOUND_INTERNAL) + machine_snd = device_add(machine_get_snd_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; +} + static const device_config_t d943_config[] = { // clang-format off { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 3d66fa9fc..0b8aacbd4 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -14096,6 +14096,52 @@ const machine_t machines[] = { .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 . */ + { + .name = "[i430HX] HP Pavilion 72xx (Ruby)", + .internal_name = "hpruby", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_hpruby_init, + .p1_handler = machine_generic_p1_handler, + .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 = 3380, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_GAMEPORT | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_virge_325_onboard_pci_device, + .snd_device = &ymf701_device, + .net_device = NULL + }, /* It possible has AMIKEY-2 'H' KBC firmware. */ { .name = "[i430HX] Siemens-Nixdorf D943", From 8324650f14270426cc85f4daa653dd37ac61d6ea Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Fri, 14 Nov 2025 22:42:27 -0600 Subject: [PATCH 4/5] Add the HP Pavilion 73xx/74xx (Ruby USB) --- src/include/86box/machine.h | 1 + src/machine/m_at_socket7.c | 71 +++++++++++++++++++++++++++++++++++++ src/machine/machine_table.c | 46 ++++++++++++++++++++++++ 3 files changed, 118 insertions(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 1dc5fecbd..08f060849 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -1044,6 +1044,7 @@ extern int machine_at_p55t2p4_init(const machine_t *); 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_rubyusb_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t cu430hx_device; #endif diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index e185632af..4715e72eb 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -143,6 +143,77 @@ machine_at_p65up5_cp55t2d_init(const machine_t *model) return ret; } +static void +machine_at_rubyusb_gpio_init(void) +{ + uint32_t gpio = 0xffffe3ff; + + /* 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; + + if (sound_card_current[0] == SOUND_INTERNAL) + gpio |= 0xffff04ff; + + machine_set_gpio_default(gpio); +} + +int +machine_at_rubyusb_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined2("roms/machines/rubyusb/1005DL0L.BIO", + "roms/machines/rubyusb/1005DL0L.BI1", + "roms/machines/rubyusb/1005DL0L.BI2", + "roms/machines/rubyusb/1005DL0L.BI3", + "roms/machines/rubyusb/1005DL0L.RCV", + /*NULL,*/ + 0x3a000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + machine_at_rubyusb_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(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + if (sound_card_current[0] == SOUND_INTERNAL) + machine_snd = device_add(machine_get_snd_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; +} + static const device_config_t cu430hx_config[] = { // clang-format off { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 0b8aacbd4..3328adf31 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -14774,6 +14774,52 @@ const machine_t machines[] = { .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 . */ + { + .name = "[i430HX] HP Pavilion 73xx/74xx (Ruby USB)", + .internal_name = "rubyusb", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_rubyusb_init, + .p1_handler = machine_generic_p1_handler, + .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 = 2800, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.0 + }, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_GAMEPORT | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_virge_325_onboard_pci_device, + .snd_device = &ymf701_device, + .net_device = NULL + }, /* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ { .name = "[i430HX] Intel CU430HX (Cumberland)", From e10de727eb11645c147585b14614c03051d30528 Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Sat, 15 Nov 2025 10:11:06 -0600 Subject: [PATCH 5/5] Remove the HP Pavilion 72xx machine due to VBIOS issues Machine has an integrated S3 ViRGE VBIOS that fails to detect a color display on some CPU clock and PIT mode combinations --- src/include/86box/machine.h | 1 - src/machine/m_at_socket7_3v.c | 67 ----------------------------------- src/machine/machine_table.c | 46 ------------------------ 3 files changed, 114 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 08f060849..c8271c674 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -1006,7 +1006,6 @@ extern int machine_at_fmb_init(const machine_t *); 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 *); -extern int machine_at_hpruby_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t d943_device; #endif diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index d14e529a9..b85025cc9 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -1229,73 +1229,6 @@ machine_at_8500tuc_init(const machine_t *model) return ret; } -static void -machine_at_ruby_gpio_init(void) -{ - uint32_t gpio = 0xffffe3ff; - - /* 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; - - if (sound_card_current[0] == SOUND_INTERNAL) - gpio |= 0xffff04ff; - - machine_set_gpio_default(gpio); -} - -int -machine_at_hpruby_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/hpruby/1007DC0L.BIO", - "roms/machines/hpruby/1007DC0L.BI1", - 0x20000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - machine_at_ruby_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(0x11, PCI_CARD_NORMAL, 1, 3, 2, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 3, 4); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - if (sound_card_current[0] == SOUND_INTERNAL) - machine_snd = device_add(machine_get_snd_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; -} - static const device_config_t d943_config[] = { // clang-format off { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 3328adf31..70222f7d4 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -14096,52 +14096,6 @@ const machine_t machines[] = { .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 . */ - { - .name = "[i430HX] HP Pavilion 72xx (Ruby)", - .internal_name = "hpruby", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_hpruby_init, - .p1_handler = machine_generic_p1_handler, - .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 = 3380, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_GAMEPORT | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, - .step = 8192 - }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &s3_virge_325_onboard_pci_device, - .snd_device = &ymf701_device, - .net_device = NULL - }, /* It possible has AMIKEY-2 'H' KBC firmware. */ { .name = "[i430HX] Siemens-Nixdorf D943",