From 0b09681c468826942dc1d5a024100280e71bb270 Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Sun, 5 Oct 2025 14:35:09 -0500 Subject: [PATCH] Add the Sony Vaio PCV-130/150 (#6282) * Add the Sony Vaio PCV-130/150 as a selectable BIOS for the AN430TX * Add Sony CDU-611 24x CD-ROM drive This may not have been the drive included in the Vaio PCV-130/150 but is contemporary, is the correct speed and satisfies the vendor-locked CD-ROM driver on the recovery CD. --- src/include/86box/cdrom.h | 1 + src/include/86box/machine.h | 5 ++- src/machine/m_at_socket7.c | 59 ++++++++++++++++++++---- src/machine/machine_table.c | 90 ++++++++++++++++++------------------- 4 files changed, 100 insertions(+), 55 deletions(-) diff --git a/src/include/86box/cdrom.h b/src/include/86box/cdrom.h index 85e5a0f0b..3fcf278af 100644 --- a/src/include/86box/cdrom.h +++ b/src/include/86box/cdrom.h @@ -174,6 +174,7 @@ static const struct cdrom_drive_types_s { { "PHILIPS", "CD-ROM PCA403CD", "U31P", "philips_403", BUS_TYPE_IDE, 0, 40, 36, 0, 0, { 4, 2, 2, -1 } }, { "SONY", "CD-ROM CDU76", "1.0i", "sony_76", BUS_TYPE_IDE, 0, 4, 36, 0, 0, { 2, -1, -1, -1 } }, { "SONY", "CD-ROM CDU311", "3.0h", "sony_311", BUS_TYPE_IDE, 0, 8, 36, 0, 0, { 3, 2, 1, -1 } }, + { "SONY", "CD-ROM CDU611", "2.2c", "sony_611", BUS_TYPE_IDE, 0, 24, 36, 0, 0, { 3, 2, 2, -1 } }, { "SONY", "CD-ROM CDU5225", "NYS4", "sony_5225", BUS_TYPE_IDE, 0, 52, 36, 0, 0, { 4, 2, 2, 4 } }, { "TEAC", "CD-516E", "1.0G", "teac_516e", BUS_TYPE_IDE, 0, 16, 36, 0, 0, { 3, 2, 2, -1 } }, { "TEAC", "CD-524EA", "3.0D", "teac_524ea", BUS_TYPE_IDE, 0, 24, 36, 0, 0, { 3, 2, 2, -1 } }, diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 7c4f9f653..ab4cfaebd 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -1043,10 +1043,13 @@ 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 *); +#ifdef EMU_DEVICE_H +extern const device_t an430tx_device; +#endif +extern int machine_at_an430tx_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 *); diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index 75f94f82e..cfe615551 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -1419,21 +1419,62 @@ machine_at_ma23c_init(const machine_t *model) return ret; } +static const device_config_t an430tx_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "an430tx", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "Packard Bell PB79x", .internal_name = "an430tx", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/an430tx/ANP0911A.BIO", "roms/machines/an430tx/ANP0911A.BI1", + "roms/machines/an430tx/ANP0911A.BI2", "roms/machines/an430tx/ANP0911A.BI3", + "roms/machines/an430tx/ANP0911A.RCV", "" } }, + { .name = "Sony Vaio PCV-130/150", .internal_name = "vaio150", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/an430tx/P02-0011.BIO", "roms/machines/an430tx/P02-0011.BI1", + "roms/machines/an430tx/P02-0011.BI2", "roms/machines/an430tx/P02-0011.BI3", + "roms/machines/an430tx/P02-0011.RCV", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t an430tx_device = { + .name = "Intel AN430TX (Anchorage)", + .internal_name = "an430tx_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = an430tx_config +}; + int machine_at_an430tx_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn[5]; - ret = bios_load_linear_combined2("roms/machines/an430tx/ANP0911A.BIO", - "roms/machines/an430tx/ANP0911A.BI1", - "roms/machines/an430tx/ANP0911A.BI2", - "roms/machines/an430tx/ANP0911A.BI3", - "roms/machines/an430tx/ANP0911A.RCV", - 0x3a000, 160); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; + device_context(model->device); + for (int i = 0; i < 5; i++) + fn[i] = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), i); + ret = bios_load_linear_combined2(fn[0], fn[1], fn[2], fn[3], fn[4], 0x3a000, 160); + device_context_restore(); + machine_at_common_init_ex(model, 2); pci_init(PCI_CONFIG_TYPE_1); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 5264b1cf8..9bd5e771f 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -15508,6 +15508,51 @@ const machine_t machines[] = { .snd_device = &cs4236b_device, .net_device = &pcnet_am79c973_onboard_device }, + /* This has the Phoenix MultiKey KBC firmware on the NSC Super I/O chip. */ + { + .name = "[i430TX] Intel AN430TX (Anchorage)", + .internal_name = "an430tx", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_an430tx_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_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, + CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), + .min_bus = 60000000, + .max_bus = 66666667, + .min_voltage = 2800, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.5 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_SOUND | MACHINE_GAMEPORT, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */ + .ram = { + .min = 8192, + .max = 262144, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &an430tx_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = &ymf715_onboard_device, + .net_device = NULL + }, /* This has the Winbond W83977 Super I/O Chip with AMIKey-2 KBC firmware, which is type 'H'. */ { .name = "[i430TX] Intel YM430TX (Yamamoto)", @@ -15649,51 +15694,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* This has the Phoenix MultiKey KBC firmware on the NSC Super I/O chip. */ - { - .name = "[i430TX] Packard Bell PB790", - .internal_name = "an430tx", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430TX, - .init = machine_at_an430tx_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_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 60000000, - .max_bus = 66666667, - .min_voltage = 2800, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_SOUND | MACHINE_GAMEPORT, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */ - .ram = { - .min = 8192, - .max = 262144, - .step = 8192 - }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .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 = NULL, - .snd_device = &ymf715_onboard_device, - .net_device = NULL - }, /* The BIOS sends KBC command BB and expects it to output a byte, which is AMI KBC behavior. A picture shows a VIA VT82C42N KBC though, so it could be a case of that KBC with AMI firmware. */ {