From 51736193af30db6a20b49d163beb50e53a0e2698 Mon Sep 17 00:00:00 2001 From: toggo9 <121191375+toggo9@users.noreply.github.com> Date: Sat, 28 Jun 2025 20:45:21 +0200 Subject: [PATCH 1/6] Add Acer V12P machine table entry. --- src/machine/machine_table.c | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 2e110df82..f4ffecae3 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -72,6 +72,7 @@ extern const device_t d943_device; extern const device_t dells333sl_device; extern const device_t hot433a_device; extern const device_t pbl300sx_device; +extern const device_t v12p_device; const machine_filter_t machine_types[] = { { "None", MACHINE_TYPE_NONE }, @@ -10057,6 +10058,45 @@ const machine_t machines[] = { /* Socket 4 machines */ /* 430LX */ + { + .name = "[i430LX] Acer V12P", + .internal_name = "v12p", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_v12p_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 | MACHINE_SCSI | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, + .step = 2048 + }, + .nvrmask = 127, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &v12p_device, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has AMIKey H KBC firmware (AMIKey-2), per POST screen with BIOS string shown in the manual. Has PS/2 mouse support with serial-style (DB9) connector. From 9e3b4c2c08fcf0da707e95bf5a6c25ad56d5e0f9 Mon Sep 17 00:00:00 2001 From: toggo9 <121191375+toggo9@users.noreply.github.com> Date: Sat, 28 Jun 2025 20:46:37 +0200 Subject: [PATCH 2/6] Add Acer V12P machine code. --- src/machine/m_at_socket4.c | 75 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/src/machine/m_at_socket4.c b/src/machine/m_at_socket4.c index 2d4e1a51a..439bcba9a 100644 --- a/src/machine/m_at_socket4.c +++ b/src/machine/m_at_socket4.c @@ -117,6 +117,81 @@ machine_at_excaliburpci_init(const machine_t *model) return ret; } +int +machine_at_v12p_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_versions"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + machine_at_common_init(model); + + device_add(&ide_isa_device); + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SCSI, 1, 4, 3, 2); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 2, 1, 4, 3); + pci_register_slot(0x03, PCI_CARD_NORMAL, 3, 2, 1, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 0, 0, 0); + pci_register_slot(0x05, PCI_CARD_NORMAL, 0, 0, 0, 0); + device_add(&i430lx_device); + device_add(&keyboard_ps2_acer_pci_device); + device_add(&sio_zb_device); + device_add(&ali5105_device); + device_add(&amd_am28f010_flash_device); + device_add(&ncr53c810_onboard_pci_device); + + return ret; +} + +static const device_config_t v12p_config[] = { + // clang-format off + { + .name = "bios_versions", + .description = "BIOS Versions", + .type = CONFIG_BIOS, + .default_string = "v12p_14", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, /*W1*/ + .bios = { + { .name = "Core Version 1.2 Version R1.4", .internal_name = "v12p_14", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/v12p/v12p_14.bin", "" } }, + { .name = "Core Version 1.2 Version R1.6", .internal_name = "v12p_16", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/v12p/v12p_16.bin", "" } }, + + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + + + +const device_t v12p_device = { + .name = "Acer V12P", + .internal_name = "v12p", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = &v12p_config[0] +}; + + int machine_at_p5mp3_init(const machine_t *model) { From 7383b1b296506c6613109747eec9c4931cb9393a Mon Sep 17 00:00:00 2001 From: toggo9 <121191375+toggo9@users.noreply.github.com> Date: Sat, 28 Jun 2025 20:47:39 +0200 Subject: [PATCH 3/6] Add Acer V12P machine definition. --- src/include/86box/machine.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index f2ca1d591..93080538b 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -655,6 +655,7 @@ extern void machine_at_award_common_init(const machine_t *); extern void machine_at_sp4_common_init(const machine_t *model); +extern int machine_at_v12p_init(const machine_t *); extern int machine_at_excaliburpci_init(const machine_t *); extern int machine_at_p5mp3_init(const machine_t *); extern int machine_at_dellxp60_init(const machine_t *); From bbf90d857ed60dc622897b7e9fef0f9cc6fc847d Mon Sep 17 00:00:00 2001 From: toggo9 <121191375+toggo9@users.noreply.github.com> Date: Sat, 28 Jun 2025 20:48:50 +0200 Subject: [PATCH 4/6] Move the Acer V12P code. --- src/machine/m_at_socket4.c | 149 ++++++++++++++++++------------------- 1 file changed, 74 insertions(+), 75 deletions(-) diff --git a/src/machine/m_at_socket4.c b/src/machine/m_at_socket4.c index 439bcba9a..12d8ccd1b 100644 --- a/src/machine/m_at_socket4.c +++ b/src/machine/m_at_socket4.c @@ -41,6 +41,80 @@ #include <86box/video.h> #include <86box/machine.h> +int +machine_at_v12p_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_versions"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + machine_at_common_init(model); + + device_add(&ide_isa_device); + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SCSI, 1, 4, 3, 2); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 2, 1, 4, 3); + pci_register_slot(0x03, PCI_CARD_NORMAL, 3, 2, 1, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 0, 0, 0); + pci_register_slot(0x05, PCI_CARD_NORMAL, 0, 0, 0, 0); + device_add(&i430lx_device); + device_add(&keyboard_ps2_acer_pci_device); + device_add(&sio_zb_device); + device_add(&ali5105_device); + device_add(&amd_am28f010_flash_device); + device_add(&ncr53c810_onboard_pci_device); + + return ret; +} + +static const device_config_t v12p_config[] = { + // clang-format off + { + .name = "bios_versions", + .description = "BIOS Versions", + .type = CONFIG_BIOS, + .default_string = "v12p_14", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, /*W1*/ + .bios = { + { .name = "Core Version 1.2 Version R1.4", .internal_name = "v12p_14", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/v12p/v12p_14.bin", "" } }, + { .name = "Core Version 1.2 Version R1.6", .internal_name = "v12p_16", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/v12p/v12p_16.bin", "" } }, + + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + + + +const device_t v12p_device = { + .name = "Acer V12P", + .internal_name = "v12p", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = &v12p_config[0] +}; + void machine_at_premiere_common_init(const machine_t *model, int pci_switch) { @@ -117,81 +191,6 @@ machine_at_excaliburpci_init(const machine_t *model) return ret; } -int -machine_at_v12p_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_versions"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - machine_at_common_init(model); - - device_add(&ide_isa_device); - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SCSI, 1, 4, 3, 2); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 2, 1, 4, 3); - pci_register_slot(0x03, PCI_CARD_NORMAL, 3, 2, 1, 4); - pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 0, 0, 0); - pci_register_slot(0x05, PCI_CARD_NORMAL, 0, 0, 0, 0); - device_add(&i430lx_device); - device_add(&keyboard_ps2_acer_pci_device); - device_add(&sio_zb_device); - device_add(&ali5105_device); - device_add(&amd_am28f010_flash_device); - device_add(&ncr53c810_onboard_pci_device); - - return ret; -} - -static const device_config_t v12p_config[] = { - // clang-format off - { - .name = "bios_versions", - .description = "BIOS Versions", - .type = CONFIG_BIOS, - .default_string = "v12p_14", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, /*W1*/ - .bios = { - { .name = "Core Version 1.2 Version R1.4", .internal_name = "v12p_14", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/v12p/v12p_14.bin", "" } }, - { .name = "Core Version 1.2 Version R1.6", .internal_name = "v12p_16", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/v12p/v12p_16.bin", "" } }, - - }, - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - - - -const device_t v12p_device = { - .name = "Acer V12P", - .internal_name = "v12p", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = &v12p_config[0] -}; - - int machine_at_p5mp3_init(const machine_t *model) { From 2230118215f394b98c56473ebb1ac5de38be9da6 Mon Sep 17 00:00:00 2001 From: toggo9 <121191375+toggo9@users.noreply.github.com> Date: Sat, 28 Jun 2025 20:51:43 +0200 Subject: [PATCH 5/6] And also limit the DRS M35/286 to 4 MB RAM. More RAM breaks stuff. --- src/machine/machine_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index f4ffecae3..c8b866143 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -4006,7 +4006,7 @@ const machine_t machines[] = { .flags = MACHINE_IDE | MACHINE_VIDEO, .ram = { .min = 512, - .max = 5000, + .max = 4096, .step = 128 }, .nvrmask = 127, From 9a02cb62c6a64896fc0544e6f6c46493d2f1634a Mon Sep 17 00:00:00 2001 From: toggo9 <121191375+toggo9@users.noreply.github.com> Date: Sat, 28 Jun 2025 20:55:23 +0200 Subject: [PATCH 6/6] and another RAM correction - the Acer V12P takes up to 192 MB RAM. --- src/machine/machine_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index c8b866143..64ef7cbc2 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -10082,7 +10082,7 @@ const machine_t machines[] = { .flags = MACHINE_IDE | MACHINE_SCSI | MACHINE_APM, .ram = { .min = 2048, - .max = 131072, + .max = 196608, .step = 2048 }, .nvrmask = 127,