Added the Sanyo MBC-17, Sharp AX 286, ECS Socket 4 machine, LG Multinet x52, and Taken Socket 4/5 machine, also IDE PIO mode 3+ fixes, and ATA-3 IDE drives now default to PIO mode 3 maximum instead of 0.

This commit is contained in:
OBattler
2025-08-15 20:59:07 +02:00
parent c3fae26ec7
commit 28e7f86296
16 changed files with 614 additions and 27 deletions

View File

@@ -45,6 +45,7 @@ add_library(mch OBJECT
m_at_socket3_pci.c
m_at_486_misc.c
m_at_socket4.c
m_at_socket4_5.c
m_at_socket5.c
m_at_socket7_3v.c
m_at_socket7.c

View File

@@ -455,8 +455,8 @@ 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",
ret = bios_load_interleaved("roms/machines/pb286/V000B200-1",
"roms/machines/pb286/V000B200-2",
0x000f0000, 65536, 0);
if (bios_only || !ret)
@@ -467,6 +467,50 @@ machine_at_pb286_init(const machine_t *model)
return ret;
}
int
machine_at_mbc17_init(const machine_t *model)
{
int ret;
ret = bios_load_interleaved("roms/machines/mbc17/SAT200C_U45EVEN_FB3H2.bin",
"roms/machines/mbc17/SAT200C_U44ODD_FB3J2.bin",
0x000f8000, 32768, 0);
if (bios_only || !ret)
return ret;
machine_at_common_ide_init(model);
device_add(&sanyo_device);
device_add(&kbc_at_device);
if (fdc_current[0] == FDC_INTERNAL)
device_add(&fdc_at_device);
return ret;
}
int
machine_at_ax286_init(const machine_t *model)
{
int ret;
ret = bios_load_interleaved("roms/machines/ax286/AM27C512@DIP28_even.BIN",
"roms/machines/ax286/AM27C512@DIP28_odd.BIN",
0x000e0000, 131072, 0);
if (bios_only || !ret)
return ret;
machine_at_common_ide_init(model);
device_add(&kbc_at_device);
if (fdc_current[0] == FDC_INTERNAL)
device_add(&fdc_at_device);
return ret;
}
int
machine_at_siemens_init(const machine_t *model)
{

View File

@@ -520,7 +520,6 @@ machine_at_p5vl_init(const machine_t *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, 5, 6, 7, 8);
pci_register_slot(0x13, PCI_CARD_NORMAL, 9, 10, 11, 12);
@@ -608,3 +607,33 @@ machine_at_p5sp4_init(const machine_t *model)
return ret;
}
int
machine_at_ecs50x_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/ecs50x/ECSSi5piaio.BIN",
0x000e0000, 131072, 0);
if (bios_only || !ret)
return ret;
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);
pci_register_slot(0x02, PCI_CARD_IDE, 1, 2, 3, 4);
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(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3);
device_add(&sis_85c50x_device);
device_add_params(&ide_cmd640_pci_device, (void *) 0x100000);
device_add(&kbc_ps2_ami_pci_device);
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
device_add(&intel_flash_bxt_device);
return ret;
}

View File

@@ -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 Socket 4/5 machines.
*
* Authors: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2016-2025 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#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/fdc_ext.h>
#include <86box/hdc.h>
#include <86box/hdc_ide.h>
#include <86box/timer.h>
#include <86box/fdd.h>
#include <86box/fdc.h>
#include <86box/keyboard.h>
#include <86box/flash.h>
#include <86box/nvr.h>
#include <86box/scsi_ncr53c8xx.h>
#include <86box/sio.h>
#include <86box/timer.h>
#include <86box/video.h>
#include <86box/machine.h>
/* OPTi 597 */
int
machine_at_pci56001_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/pci56001/AWARD_ISA_PCI_586_non_PNP_SN_013870745_1994.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(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x12, PCI_CARD_NORMAL, 5, 6, 7, 8);
pci_register_slot(0x13, PCI_CARD_NORMAL, 9, 10, 11, 12);
pci_register_slot(0x14, PCI_CARD_NORMAL, 13, 14, 15, 16);
device_add(&opti5x7_pci_device);
device_add(&opti822_device);
device_add(&sst_flash_29ee010_device);
device_add(&kbc_at_ami_device);
if (fdc_current[0] == FDC_INTERNAL)
device_add(&fdc_at_device);
return ret;
}

View File

@@ -801,6 +801,75 @@ machine_at_brio80xx_init(const machine_t *model)
return ret;
}
static const device_config_t lgibmx52_config[] = {
// clang-format off
{
.name = "bios",
.description = "BIOS Version",
.type = CONFIG_BIOS,
.default_string = "lgibmx52",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.bios = {
{ .name = "08/21/97", .internal_name = "lgibmx52_082197", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/lgibmx52/BIOS.ROM", "" } },
{ .name = "03/26/99", .internal_name = "lgibmx52", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/lgibmx52/MS5136 LG IBM OEM.ROM", "" } },
{ .files_no = 0 }
},
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
const device_t lgibmx52_device = {
.name = "LG IBM Multinet x52 (MSI MS-5136)",
.internal_name = "lgibmx52_device",
.flags = 0,
.local = 0,
.init = NULL,
.close = NULL,
.reset = NULL,
.available = NULL,
.speed_changed = NULL,
.force_redraw = NULL,
.config = lgibmx52_config
};
int
machine_at_lgibmx52_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);
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, 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);
device_add(&i430vx_device);
device_add(&piix3_device);
device_add(&kbc_ps2_ami_pci_device);
device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0));
device_add(&winbond_flash_w29c010_device);
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

View File

@@ -55,6 +55,7 @@ const machine_filter_t machine_types[] = {
{ "[1994] i486 (Socket 3 PCI)", MACHINE_TYPE_486_S3_PCI },
{ "[1992] i486 (Miscellaneous)", MACHINE_TYPE_486_MISC },
{ "[1993] Socket 4", MACHINE_TYPE_SOCKET4 },
{ "[1994] Socket 4/5", MACHINE_TYPE_SOCKET4_5 },
{ "[1994] Socket 5", MACHINE_TYPE_SOCKET5 },
{ "[1995] Socket 7 (Single Voltage)", MACHINE_TYPE_SOCKET7_3V },
{ "[1996] Socket 7 (Dual Voltage)", MACHINE_TYPE_SOCKET7 },
@@ -3543,6 +3544,92 @@ const machine_t machines[] = {
.snd_device = NULL,
.net_device = NULL
},
/* Has unknown KBC firmware. */
{
.name = "[ISA] Sanyo MBC-17",
.internal_name = "mbc17",
.type = MACHINE_TYPE_286,
.chipset = MACHINE_CHIPSET_DISCRETE,
.init = machine_at_mbc17_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 = 0,
.max_bus = 12000000,
.min_voltage = 0,
.max_voltage = 0,
.min_multi = 0,
.max_multi = 0
},
.bus_flags = MACHINE_AT,
.flags = MACHINE_IDE,
.ram = {
.min = 512,
.max = 16384,
.step = 128
},
.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 unknown KBC firmware. */
{
.name = "[ISA] Sharp AX 286",
.internal_name = "ax286",
.type = MACHINE_TYPE_286,
.chipset = MACHINE_CHIPSET_DISCRETE,
.init = machine_at_ax286_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 = 0,
.max_bus = 0,
.min_voltage = 0,
.max_voltage = 0,
.min_multi = 0,
.max_multi = 0
},
.bus_flags = MACHINE_AT,
.flags = MACHINE_IDE,
.ram = {
.min = 512,
.max = 16384,
.step = 128
},
.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 a Siemens proprietary KBC which is completely undocumented. */
{
.name = "[ISA] Siemens PCD-2L",
@@ -11589,6 +11676,96 @@ const machine_t machines[] = {
.snd_device = NULL,
.net_device = NULL
},
/* This has an AMIKey-2, which is an updated version of type 'H'. */
{
.name = "[SiS 501] ECS SI5PI AIO",
.internal_name = "ecs50x",
.type = MACHINE_TYPE_SOCKET4,
.chipset = MACHINE_CHIPSET_SIS_501,
.init = machine_at_ecs50x_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_APM,
.ram = {
.min = 8192,
.max = 131072,
.step = 8192
},
.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
},
/* Socket 4/5 machines */
/* OPTi 596/597 */
/* This has AMIKey-2 'H' KBC firmware. */
{
.name = "[OPTi 597] Taken PCI560-01",
.internal_name = "pci56001",
.type = MACHINE_TYPE_SOCKET4_5,
.chipset = MACHINE_CHIPSET_OPTI_547_597,
.init = machine_at_pci56001_init,
.p1_handler = NULL,
.gpio_handler = NULL,
.available_flag = MACHINE_AVAILABLE,
.gpio_acpi_handler = NULL,
.cpu = {
.package = CPU_PKG_SOCKET4 | CPU_PKG_SOCKET5_7,
.block = CPU_BLOCK_NONE,
.min_bus = 50000000,
.max_bus = 66666667,
.min_voltage = 3520,
.max_voltage = 5000,
.min_multi = 1.0,
.max_multi = 1.5
},
.bus_flags = MACHINE_PCI,
.flags = MACHINE_APM,
.ram = {
.min = 8192,
.max = 131072,
.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 5 machines */
/* 430NX */
/* This has the Phoenix MultiKey KBC firmware.
@@ -14533,6 +14710,49 @@ const machine_t machines[] = {
.snd_device = NULL,
.net_device = NULL
},
/* Has the AMIKey-2 (updated 'H') KBC firmware. */
{
.name = "[i430VX] LG IBM Multinet x52 (MSI MS-5136)",
.internal_name = "lgibmx52",
.type = MACHINE_TYPE_SOCKET7,
.chipset = MACHINE_CHIPSET_INTEL_430VX,
.init = machine_at_lgibmx52_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 = 75000000,
.min_voltage = 2100,
.max_voltage = 3520,
.min_multi = 1.5,
.max_multi = 4.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_APM,
.ram = {
.min = 8192,
.max = 131072,
.step = 4096
},
.nvrmask = 127,
.jumpered_ecp_dma = 0,
.default_jumpered_ecp_dma = -1,
.kbc_device = NULL,
.kbc_p1 = 0xff,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = &lgibmx52_device,
.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 . */