From 8cc6f215362436aa72be5b1002ab830058a0602f Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 29 Mar 2025 18:32:41 +0100 Subject: [PATCH 1/6] PB450: Fix the default BIOS selection, fixes segmentation fault. --- src/machine/m_at_386dx_486.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 19c4b535e..639233e10 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -691,12 +691,12 @@ static const device_config_t pb450_config[] = { .name = "bios", .description = "BIOS Version", .type = CONFIG_BIOS, - .default_string = "pci10a", + .default_string = "pb450a", .default_int = 0, .file_filter = "", .spinner = { 0 }, .bios = { - { .name = "PCI 1.0A", .internal_name = "pb450" /*"pci10a"*/, .bios_type = BIOS_NORMAL, + { .name = "PCI 1.0A", .internal_name = "pb450a" /*"pci10a"*/, .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/OPTI802.bin", "" } }, { .name = "PNP 1.1A", .internal_name = "pnp11a", .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/PNP11A.bin", "" } }, @@ -732,7 +732,7 @@ machine_at_pb450_init(const machine_t *model) return ret; device_context(model->device); - fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); + 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(); From 99c81fe03d640f06d16682e67ad84110bcfa9406 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 29 Mar 2025 18:36:33 +0100 Subject: [PATCH 2/6] IBM PC/XT/AT and PB450: Remove "Device" from machine device_t names. --- src/machine/m_at.c | 4 ++-- src/machine/m_at_386dx_486.c | 2 +- src/machine/m_xt.c | 12 ++++++------ src/machine/m_xt_laserxt.c | 11 +++++++---- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/machine/m_at.c b/src/machine/m_at.c index 3f5e88011..8a561630c 100644 --- a/src/machine/m_at.c +++ b/src/machine/m_at.c @@ -187,7 +187,7 @@ static const device_config_t ibmat_config[] = { }; const device_t ibmat_device = { - .name = " IBM AT Devices", + .name = "IBM AT", .internal_name = "ibmat_device", .flags = 0, .local = 0, @@ -294,7 +294,7 @@ static const device_config_t ibmxt286_config[] = { }; const device_t ibmxt286_device = { - .name = "IBM XT Model 286 Devices", + .name = "IBM XT Model 286", .internal_name = "ibmxt286_device", .flags = 0, .local = 0, diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 639233e10..0ee353f53 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -708,7 +708,7 @@ static const device_config_t pb450_config[] = { }; const device_t pb450_device = { - .name = "Packard Bell PB450 Devices", + .name = "Packard Bell PB450", .internal_name = "pb450_device", .flags = 0, .local = 0, diff --git a/src/machine/m_xt.c b/src/machine/m_xt.c index 78d2daa13..13f9c52ca 100644 --- a/src/machine/m_xt.c +++ b/src/machine/m_xt.c @@ -108,7 +108,7 @@ static const device_config_t ibmpc_config[] = { }; const device_t ibmpc_device = { - .name = "IBM PC (1981) Device", + .name = "IBM PC (1981)", .internal_name = "ibmpc_device", .flags = 0, .local = 0, @@ -218,7 +218,7 @@ static const device_config_t ibmpc82_config[] = { }; const device_t ibmpc82_device = { - .name = "IBM PC (1982) Devices", + .name = "IBM PC (1982)", .internal_name = "ibmpc82_device", .flags = 0, .local = 0, @@ -331,7 +331,7 @@ static const device_config_t ibmxt_config[] = { }; const device_t ibmxt_device = { - .name = "IBM XT (1982) Device", + .name = "IBM XT (1982)", .internal_name = "ibmxt_device", .flags = 0, .local = 0, @@ -451,7 +451,7 @@ static const device_config_t ibmxt86_config[] = { }; const device_t ibmxt86_device = { - .name = "IBM XT (1986) Device", + .name = "IBM XT (1986)", .internal_name = "ibmxt86_device", .flags = 0, .local = 0, @@ -624,7 +624,7 @@ static const device_config_t jukopc_config[] = { }; const device_t jukopc_device = { - .name = "Juko ST Devices", + .name = "Juko ST", .internal_name = "jukopc_device", .flags = 0, .local = 0, @@ -949,7 +949,7 @@ static const device_config_t vendex_config[] = { }; const device_t vendex_device = { - .name = "Vendex 888T Devices", + .name = "Vendex 888T", .internal_name = "vendex_device", .flags = 0, .local = 0, diff --git a/src/machine/m_xt_laserxt.c b/src/machine/m_xt_laserxt.c index 877d26ff5..595cce1ca 100644 --- a/src/machine/m_xt_laserxt.c +++ b/src/machine/m_xt_laserxt.c @@ -154,6 +154,8 @@ machine_xt_laserxt_common_init(const machine_t *model,int is_lxt3) standalone_gameport_type = &gameport_device; laserxt_init(is_lxt3); + + device_add(&keyboard_xt_lxt3_device); } int @@ -167,8 +169,6 @@ machine_xt_laserxt_init(const machine_t *model) if (bios_only || !ret) return ret; - device_add(&keyboard_xt_device); - machine_xt_laserxt_common_init(model, 0); return ret; @@ -179,14 +179,17 @@ machine_xt_lxt3_init(const machine_t *model) { int ret; +#if 0 ret = bios_load_linear("roms/machines/lxt3/27c64d.bin", 0x000fe000, 8192, 0); +#else + ret = bios_load_linear("roms/machines/lxt3/vtech-laser-xt3-bios-v1-26-27c64-637cfbe96dfa1809192278.bin", + 0x000fe000, 8192, 0); +#endif if (bios_only || !ret) return ret; - device_add(&keyboard_xt_lxt3_device); - machine_xt_laserxt_common_init(model, 1); return ret; From c1ecafaeb55e597e068ad61a8a563d5162e81019 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 29 Mar 2025 18:38:20 +0100 Subject: [PATCH 3/6] IBM PS/1 Model 2011: No need to explicitly refer to the zeroth element of the config array. --- src/machine/m_ps1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/m_ps1.c b/src/machine/m_ps1.c index 41821a4a8..07128f157 100644 --- a/src/machine/m_ps1.c +++ b/src/machine/m_ps1.c @@ -290,7 +290,7 @@ const device_t ps1_2011_device = { .available = NULL, .speed_changed = NULL, .force_redraw = NULL, - .config = &ps1_2011_config[0] + .config = &ps1_2011_config }; static void From e48c6c8e8bd631471b45052c69270249e5193baa Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 29 Mar 2025 18:40:27 +0100 Subject: [PATCH 4/6] Laser XT3: No longer use the other BIOS that has not yet been committed. --- src/machine/m_xt_laserxt.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/machine/m_xt_laserxt.c b/src/machine/m_xt_laserxt.c index 595cce1ca..c0405f99a 100644 --- a/src/machine/m_xt_laserxt.c +++ b/src/machine/m_xt_laserxt.c @@ -179,13 +179,8 @@ machine_xt_lxt3_init(const machine_t *model) { int ret; -#if 0 ret = bios_load_linear("roms/machines/lxt3/27c64d.bin", 0x000fe000, 8192, 0); -#else - ret = bios_load_linear("roms/machines/lxt3/vtech-laser-xt3-bios-v1-26-27c64-637cfbe96dfa1809192278.bin", - 0x000fe000, 8192, 0); -#endif if (bios_only || !ret) return ret; From 8b646ccc49a5d6b4f0e7ce9ccf7042d7d89c14f2 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 29 Mar 2025 18:47:21 +0100 Subject: [PATCH 5/6] Fix a compile-breaking mistake in machine/m_ps1.c. --- src/machine/m_ps1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/m_ps1.c b/src/machine/m_ps1.c index 07128f157..c22463de4 100644 --- a/src/machine/m_ps1.c +++ b/src/machine/m_ps1.c @@ -290,7 +290,7 @@ const device_t ps1_2011_device = { .available = NULL, .speed_changed = NULL, .force_redraw = NULL, - .config = &ps1_2011_config + .config = ps1_2011_config }; static void From b6b840b67ec8f680d69d0672e49b8a0e6fd851df Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 29 Mar 2025 19:54:48 +0100 Subject: [PATCH 6/6] Recognize 8514/a-type cards as (S)VGA for the purposes of force 4:3 calculations, fixes blurry picture and wrong resolution. --- src/86box.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/86box.c b/src/86box.c index 2b6e1ba9f..ad1cfc519 100644 --- a/src/86box.c +++ b/src/86box.c @@ -1624,6 +1624,8 @@ set_screen_size_monitor(int x, int y, int monitor_index) { int temp_overscan_x = monitors[monitor_index].mon_overscan_x; int temp_overscan_y = monitors[monitor_index].mon_overscan_y; + int is_svga = (video_get_type_monitor(monitor_index) == VIDEO_FLAG_TYPE_SPECIAL) || + (video_get_type_monitor(monitor_index) == VIDEO_FLAG_TYPE_8514); double dx; double dy; double dtx; @@ -1657,19 +1659,19 @@ set_screen_size_monitor(int x, int y, int monitor_index) dty = (double) temp_overscan_y; /* Account for possible overscan. */ - if (video_get_type_monitor(monitor_index) != VIDEO_FLAG_TYPE_SPECIAL && (temp_overscan_y == 16)) { + if (!is_svga && (temp_overscan_y == 16)) { /* CGA */ dy = (((dx - dtx) / 4.0) * 3.0) + dty; - } else if (video_get_type_monitor(monitor_index) != VIDEO_FLAG_TYPE_SPECIAL && (temp_overscan_y < 16)) { + } else if (!is_svga && (temp_overscan_y < 16)) { /* MDA/Hercules */ - dy = (x / 4.0) * 3.0; + dy = (dx / 4.0) * 3.0; } else { if (enable_overscan) { /* EGA/(S)VGA with overscan */ dy = (((dx - dtx) / 4.0) * 3.0) + dty; } else { /* EGA/(S)VGA without overscan */ - dy = (x / 4.0) * 3.0; + dy = (dx / 4.0) * 3.0; } } monitors[monitor_index].mon_unscaled_size_y = (int) dy;