From e821aa1b0a8eed7ebe24959b3fb7d472f350e673 Mon Sep 17 00:00:00 2001 From: pankozaC++ <77279607+pankoza2-pl@users.noreply.github.com> Date: Fri, 21 Feb 2025 22:52:27 +0100 Subject: [PATCH 1/5] Add Packard Bell PB286 (part 1) --- src/include/86box/machine.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 78f4902eb..6d48dbff6 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -438,6 +438,8 @@ extern int machine_at_ibmatquadtel_init(const machine_t *); // IBM AT with Quadt extern int machine_at_ibmxt286_init(const machine_t *); +extern int machine_at_pb286_init(const machine_t *); + extern int machine_at_siemens_init(const machine_t *); // Siemens PCD-2L. N82330 discrete machine. It segfaults in some places extern int machine_at_wellamerastar_init(const machine_t *); // Wells American A*Star with custom award BIOS From e4600291ed0135735021de2984fa73c205d6ff8f Mon Sep 17 00:00:00 2001 From: pankozaC++ <77279607+pankoza2-pl@users.noreply.github.com> Date: Fri, 21 Feb 2025 22:56:09 +0100 Subject: [PATCH 2/5] Add Packard Bell PB286 (part 2) --- src/machine/m_at.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/machine/m_at.c b/src/machine/m_at.c index 3f5e88011..15b828676 100644 --- a/src/machine/m_at.c +++ b/src/machine/m_at.c @@ -332,6 +332,22 @@ machine_at_ibmxt286_init(const machine_t *model) return ret; } +machine_at_pb286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/pb286/LB_V332P.BIN", + "roms/machines/pb286/HB_V332P.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + return ret; +} + int machine_at_siemens_init(const machine_t *model) { From e0fda208dfa4d1d788a6b0a82e5211b1916d9661 Mon Sep 17 00:00:00 2001 From: pankozaC++ <77279607+pankoza2-pl@users.noreply.github.com> Date: Fri, 21 Feb 2025 23:03:16 +0100 Subject: [PATCH 3/5] Add Packard Bell PB286 (part 3) --- src/machine/machine_table.c | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 3706126a3..eb0584802 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -3259,6 +3259,47 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* Has IBM AT KBC firmware. */ + /* To configure the BIOS, use PB_2330a_diag.IMA from MS-DOS 3.30 Packard Bell OEM, GSETUP might work too*/ + { + .name = "[ISA] Packard Bell PB286", + .internal_name = "pb286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_pb286_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .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_AT, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 1024, + .step = 256 + }, + .nvrmask = 63, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* This has a Siemens proprietary KBC which is completely undocumented. */ { .name = "[ISA] Siemens PCD-2L", From e012777244f903fc3ffe9d2dc44229eb12bb6f46 Mon Sep 17 00:00:00 2001 From: pankozaC++ <77279607+pankoza2-pl@users.noreply.github.com> Date: Fri, 21 Feb 2025 23:19:57 +0100 Subject: [PATCH 4/5] Fix compile-breaking mistake (forgot "int") --- src/machine/m_at.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/machine/m_at.c b/src/machine/m_at.c index 15b828676..162006803 100644 --- a/src/machine/m_at.c +++ b/src/machine/m_at.c @@ -332,6 +332,7 @@ machine_at_ibmxt286_init(const machine_t *model) return ret; } +int machine_at_pb286_init(const machine_t *model) { int ret; From 48da4f3811898058762be3fb5ab374c8e46918db Mon Sep 17 00:00:00 2001 From: pankozaC++ <77279607+pankoza2-pl@users.noreply.github.com> Date: Sat, 22 Feb 2025 00:27:23 +0100 Subject: [PATCH 5/5] adjust the RAM step, Packard Bell 286s are known to support 640 KB RAM configurations --- 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 eb0584802..abfdf9d16 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -3286,7 +3286,7 @@ const machine_t machines[] = { .ram = { .min = 256, .max = 1024, - .step = 256 + .step = 128 }, .nvrmask = 63, .kbc_device = NULL,