From 430627e77669e82724bce66991872640db660a20 Mon Sep 17 00:00:00 2001 From: Bozo Scum Date: Tue, 9 Sep 2025 10:11:48 +0800 Subject: [PATCH 1/4] fix file handler typo in line #422 --- src/minitrace/minitrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/minitrace/minitrace.c b/src/minitrace/minitrace.c index 290486ec5..9762f1c55 100644 --- a/src/minitrace/minitrace.c +++ b/src/minitrace/minitrace.c @@ -419,7 +419,7 @@ void mtr_flush_with_state(int is_last) { len = snprintf(linebuf, ARRAY_SIZE(linebuf), "%s{\"cat\":\"%s\",\"pid\":%i,\"tid\":%i,\"ts\":%" PRId64 ",\"ph\":\"%c\",\"name\":\"%s\",\"args\":{%s}%s}", first_line ? "" : ",\n", cat, raw->pid, raw->tid, raw->ts - time_offset, raw->ph, raw->name, arg_buf, id_buf); - fwrite(linebuf, 1, len, f); + fwrite(linebuf, 1, len, fp); first_line = 0; if (raw->arg_type == MTR_ARG_TYPE_STRING_COPY) { From fb64862fcffc994d1e4666c773a6ee06f74b10a5 Mon Sep 17 00:00:00 2001 From: Bozo Scum Date: Tue, 9 Sep 2025 12:33:52 +0800 Subject: [PATCH 2/4] rename machine 'Multitech PC-500' to 'Multitech PC-500 plus' --- src/include/86box/machine.h | 2 +- src/machine/m_xt.c | 4 ++-- src/machine/machine_table.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 7ab675a6c..6eecb9f49 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -1319,7 +1319,7 @@ extern const device_t jukopc_device; extern int machine_xt_jukopc_init(const machine_t *); extern int machine_xt_kaypropc_init(const machine_t *); extern int machine_xt_micoms_xl7turbo_init(const machine_t *); -extern int machine_xt_pc500_init(const machine_t *); +extern int machine_xt_pc500plus_init(const machine_t *); extern int machine_xt_pc700_init(const machine_t *); extern int machine_xt_pc4i_init(const machine_t *); extern int machine_xt_openxt_init(const machine_t *); diff --git a/src/machine/m_xt.c b/src/machine/m_xt.c index 954483d62..b909857d1 100644 --- a/src/machine/m_xt.c +++ b/src/machine/m_xt.c @@ -975,12 +975,12 @@ machine_xt_micoms_xl7turbo_init(const machine_t *model) } int -machine_xt_pc500_init(const machine_t *model) +machine_xt_pc500plus_init(const machine_t *model) { int ret; ret = bios_load_linear("roms/machines/pc500/rom404.bin", - 0x000f8000, 32768, 0); + 0x000fc000, 16384, 0); if (bios_only || !ret) return ret; diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 7891bb3db..ec5f2e9f0 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -1095,11 +1095,11 @@ const machine_t machines[] = { .net_device = NULL }, { - .name = "[8088] Multitech PC-500", - .internal_name = "pc500", + .name = "[8088] Multitech PC-500 plus", + .internal_name = "pc500plus", .type = MACHINE_TYPE_8088, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_pc500_init, + .init = machine_xt_pc500plus_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, From a5a9ca148e2ef48da7884daf11abbd39fe64afab Mon Sep 17 00:00:00 2001 From: Bozo Scum Date: Tue, 9 Sep 2025 12:39:41 +0800 Subject: [PATCH 3/4] add machine Multitech PC-500 with BIOS ROM v3.10 and v3.30 --- src/include/86box/machine.h | 4 ++ src/machine/m_xt.c | 75 +++++++++++++++++++++++++++++++++++++ src/machine/machine_table.c | 43 +++++++++++++++++++++ 3 files changed, 122 insertions(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 6eecb9f49..b2520976e 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -1319,6 +1319,10 @@ extern const device_t jukopc_device; extern int machine_xt_jukopc_init(const machine_t *); extern int machine_xt_kaypropc_init(const machine_t *); extern int machine_xt_micoms_xl7turbo_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t pc500_device; +#endif +extern int machine_xt_pc500_init(const machine_t *); extern int machine_xt_pc500plus_init(const machine_t *); extern int machine_xt_pc700_init(const machine_t *); extern int machine_xt_pc4i_init(const machine_t *); diff --git a/src/machine/m_xt.c b/src/machine/m_xt.c index b909857d1..815045389 100644 --- a/src/machine/m_xt.c +++ b/src/machine/m_xt.c @@ -974,6 +974,81 @@ machine_xt_micoms_xl7turbo_init(const machine_t *model) return ret; } +static const device_config_t pc500_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "pc500_330", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .bios = { + { + .name = "3.30", + .internal_name = "pc500_330", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 8192, + .files = { "roms/machines/pc500/rom330.bin", "" } + }, + { + .name = "3.10", + .internal_name = "pc500_310", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 8192, + .files = { "roms/machines/pc500/rom310.bin", "" } + }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t pc500_device = { + .name = "Multitech PC-500", + .internal_name = "pc500_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = pc500_config +}; + +int +machine_xt_pc500_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(model->device, device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000fe000, 8192, 0); + device_context_restore(); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_pc_device); + + machine_xt_common_init(model, 0); + + return ret; +} + int machine_xt_pc500plus_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index ec5f2e9f0..8f6d20a27 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -1094,6 +1094,49 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + { + .name = "[8088] Multitech PC-500", + .internal_name = "pc500", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pc500_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_8088, + .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_PC, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 128, + .max = 640, + .step = 64 + }, + .nvrmask = 0, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_pc_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &pc500_device, + .kbd_device = &keyboard_pc_xt_device, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, { .name = "[8088] Multitech PC-500 plus", .internal_name = "pc500plus", From 32555f0edb61b434acaf9cd890bc6ae227ed9cf6 Mon Sep 17 00:00:00 2001 From: Bozo Scum Date: Tue, 9 Sep 2025 13:03:18 +0800 Subject: [PATCH 4/4] add machine 'Multitech PC-900' --- src/include/86box/machine.h | 1 + src/machine/m_at_286.c | 21 ++++++++++++++++++ src/machine/machine_table.c | 44 +++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index b2520976e..6de1586dc 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -498,6 +498,7 @@ extern int machine_at_cmdpc_init(const machine_t *); extern int machine_at_portableii_init(const machine_t *); extern int machine_at_portableiii_init(const machine_t *); extern int machine_at_grid1520_init(const machine_t *); +extern int machine_at_mpfpc900_init(const machine_t *); extern int machine_at_mr286_init(const machine_t *); extern int machine_at_pc8_init(const machine_t *); extern int machine_at_m290_init(const machine_t *); diff --git a/src/machine/m_at_286.c b/src/machine/m_at_286.c index f74ad5115..a1b71a817 100644 --- a/src/machine/m_at_286.c +++ b/src/machine/m_at_286.c @@ -328,6 +328,27 @@ machine_at_grid1520_init(const machine_t *model) { return ret; } +int +machine_at_mpfpc900_init(const machine_t *model) { + int ret = 0; + + ret = bios_load_linear("roms/machines/pc900/mpf_pc900_v207a.bin", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + mem_remap_top(384); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + int machine_at_mr286_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 8f6d20a27..20baadfcf 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -3343,6 +3343,50 @@ const machine_t machines[] = { .net_device = NULL }, /* Has IBM AT KBC firmware. */ + { + .name = "[ISA] Multitech PC-900", + .internal_name = "mpfpc900", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_mpfpc900_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 10000000, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 1024, + .step = 128 + }, + .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, + .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 IBM AT KBC firmware. */ { .name = "[ISA] MR BIOS 286 clone", .internal_name = "mr286",