From 5b7ac6fa2116f5e2c5fe1bf79e980bd88e27a035 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 8 Oct 2025 20:10:42 +0600 Subject: [PATCH] Add Intel Advanced/MA (Monaco) (#6297) --- src/include/86box/machine.h | 1 + src/include/86box/video.h | 1 + src/machine/m_at_socket7_3v.c | 37 ++++++++++++++++++++++++++++ src/machine/machine_table.c | 46 +++++++++++++++++++++++++++++++++++ src/video/vid_ati_mach64.c | 15 ++++++++++++ 5 files changed, 100 insertions(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 2cb95d017..0c22f94e4 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -960,6 +960,7 @@ extern const device_t thor_device; extern int machine_at_thor_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_monaco_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 *); diff --git a/src/include/86box/video.h b/src/include/86box/video.h index a142a63fc..a9bffa0c1 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -333,6 +333,7 @@ extern const device_t mach64gx_isa_device; extern const device_t mach64gx_vlb_device; extern const device_t mach64gx_pci_device; extern const device_t mach64ct_device; +extern const device_t mach64ct_device_onboard; extern const device_t mach64vt_device; extern const device_t mach64vt2_device; diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index 76d09dbe0..8a72c667f 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -465,6 +465,43 @@ machine_at_endeavor_init(const machine_t *model) return ret; } + +int +machine_at_monaco_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/monaco/1007cl0_.bio", + "roms/machines/monaco/1007cl0_.bi1", + 0x20000, 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(0x07, PCI_CARD_SOUTHBRIDGE, 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); + + 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; +} int machine_at_ms5119_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 05390668e..45fdb6bc3 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -13380,6 +13380,52 @@ const machine_t machines[] = { .snd_device = &sb_vibra16s_onboard_device, .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] Intel Advanced/MA (Monaco)", + .internal_name = "monaco", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_monaco_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_APM, /* Machine has onboard sound: Crystal CS4232-KQ */ + .ram = { + .min = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 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 = &mach64ct_device_onboard, + .snd_device = NULL, + .net_device = NULL + }, /* This has an AMIKey-2, which is type 'H'. */ { .name = "[i430FX] MSI MS-5119", diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index 4a819b7d1..d003687f4 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -4916,6 +4916,7 @@ mach64_common_init(const device_t *info) mach64->wake_fifo_thread = thread_create_event(); mach64->fifo_not_full_event = thread_create_event(); mach64->fifo_thread = thread_create(fifo_thread, mach64); + mach64->on_board = !!(info->local & (1 << 19)); mach64->i2c = i2c_gpio_init("ddc_ati_mach64"); mach64->ddc = ddc_init(i2c_gpio_get_bus(mach64->i2c)); @@ -5222,6 +5223,20 @@ const device_t mach64ct_device = { .config = NULL }; +const device_t mach64ct_device_onboard = { + .name = "ATI Mach64CT (On-Board)", + .internal_name = "mach64ct", + .flags = DEVICE_PCI, + .local = MACH64_CT | (1 << 19), + .init = mach64ct_init, + .close = mach64_close, + .reset = NULL, + .available = NULL, + .speed_changed = mach64_speed_changed, + .force_redraw = mach64_force_redraw, + .config = NULL +}; + const device_t mach64vt_device = { .name = "ATI Mach64VT", .internal_name = "mach64vt",