From d9718a9e5f0b07a73d2379672d74d33ba8604c8f Mon Sep 17 00:00:00 2001 From: MaxwellS04 Date: Thu, 30 Oct 2025 15:04:04 +0700 Subject: [PATCH 1/2] Added the Leadtek AwardBIOS variant of P6SBA --- src/include/86box/machine.h | 3 ++ src/machine/m_at_slot1.c | 65 ++++++++++++++++++++++++++++++++++--- src/machine/machine_table.c | 2 +- 3 files changed, 64 insertions(+), 6 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index ac20b3085..628e388e8 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -1223,6 +1223,9 @@ extern int machine_at_ms6119_init(const machine_t *); extern const device_t ms6147_device; #endif extern int machine_at_ms6147_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t p6sba_device; +#endif extern int machine_at_p6sba_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t s1846_device; diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index bf9a5af22..ee3d0b0ee 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -955,17 +955,72 @@ machine_at_ms6147_init(const machine_t *model) return ret; } +static const device_config_t p6sba_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "p6sba", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "AMIBIOS 6 (071595) - Revision R3.1", + .internal_name = "p6sba", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/p6sba/SBAB21.ROM", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision 05/07/1999 (Leadtek WinFast 8000BX)", + .internal_name = "8000bx", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/p6sba/leadtek-8000bx-80000507.bin", "" } + }, + { .files_no = 0 } + } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t p6sba_device = { + .name = "Supermicro P6SBA", + .internal_name = "p6sba_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = p6sba_config +}; + int machine_at_p6sba_init(const machine_t *model) { - int ret; + int ret = 0; + const char *fn; - ret = bios_load_linear("roms/machines/p6sba/SBAB21.ROM", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) + /* 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"), 0); + ret = bios_load_linear(fn, 0x000c0000, 262144, 0); + 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 d8bdade84..e8d46bc1a 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -18436,7 +18436,7 @@ const machine_t machines[] = { .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &p6sba_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, From 0c9be843aeca729d4bdac8e2b83849a77ef3761c Mon Sep 17 00:00:00 2001 From: MaxwellS04 Date: Thu, 30 Oct 2025 16:06:36 +0700 Subject: [PATCH 2/2] Corrected the BIOS version for Leadtek variant --- src/machine/m_at_slot1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index ee3d0b0ee..cb77c332d 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -977,7 +977,7 @@ static const device_config_t p6sba_config[] = { .files = { "roms/machines/p6sba/SBAB21.ROM", "" } }, { - .name = "Award Modular BIOS v4.51PG - Revision 05/07/1999 (Leadtek WinFast 8000BX)", + .name = "Award Modular BIOS v4.60PGA - Revision 05/07/1999 (Leadtek WinFast 8000BX)", .internal_name = "8000bx", .bios_type = BIOS_NORMAL, .files_no = 1,