diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 1f8aaeae3..7011841fc 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -635,6 +635,9 @@ extern int machine_at_tandy4000_init(const machine_t *); extern int machine_at_ecs386v_init(const machine_t *); /* OPTi 391 */ +#ifdef EMU_DEVICE_H +extern const device_t dataexpert386wb_device; +#endif extern int machine_at_dataexpert386wb_init(const machine_t *); /* OPTi 495SLC */ @@ -866,6 +869,9 @@ extern const device_t v12p_device; #endif extern int machine_at_v12p_init(const machine_t *); extern int machine_at_excaliburpci_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t p5mp3_device; +#endif extern int machine_at_p5mp3_init(const machine_t *); extern int machine_at_opti560l_init(const machine_t *); extern void machine_at_award_common_init(const machine_t *); @@ -1213,6 +1219,9 @@ extern const device_t s1846_device; extern int machine_at_s1846_init(const machine_t *); /* i440ZX */ +#ifdef EMU_DEVICE_H +extern const device_t vei8_device; +#endif extern int machine_at_vei8_init(const machine_t *); extern int machine_at_ms6168_init(const machine_t *); extern int machine_at_borapro_init(const machine_t *); @@ -1240,6 +1249,9 @@ extern int machine_at_fw6400gx_init(const machine_t *); /* m_at_slot1_socket370.c */ /* i440BX */ +#ifdef EMU_DEVICE_H +extern const device_t prosignias31x_device; +#endif extern int machine_at_prosignias31x_bx_init(const machine_t *); extern int machine_at_s1857_init(const machine_t *); diff --git a/src/machine/m_at_386dx.c b/src/machine/m_at_386dx.c index 5816204ed..3070c19c1 100644 --- a/src/machine/m_at_386dx.c +++ b/src/machine/m_at_386dx.c @@ -332,17 +332,71 @@ machine_at_ecs386v_init(const machine_t *model) } /* OPTi 391 */ +static const device_config_t dataexpert386wb_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "dataexpert386wb", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "AMIBIOS 050591", + .internal_name = "ami386wb", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 65536, + .files = { "roms/machines/dataexpert386wb/386-OPTI-386WB-10.BIN", "" } + }, + { + .name = "MR BIOS V1.26", + .internal_name = "dataexpert386wb", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 65536, + .files = { "roms/machines/dataexpert386wb/st0386-wb-ver2-0-618f078c738cb397184464.bin", "" } + }, + { .files_no = 0 } + } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t dataexpert386wb_device = { + .name = "DataExpert 386WB", + .internal_name = "dataexpert386wb_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = dataexpert386wb_config +}; + int machine_at_dataexpert386wb_init(const machine_t *model) { - int ret; + int ret = 0; + const char *fn; - ret = bios_load_linear("roms/machines/dataexpert386wb/st0386-wb-ver2-0-618f078c738cb397184464.bin", - 0x000f0000, 65536, 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, 0x000f0000, 65536, 0); + machine_at_common_init(model); device_add(&opti391_device); diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 5345724d6..a89044af7 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -1085,18 +1085,73 @@ machine_at_s1846_init(const machine_t *model) return ret; } +static const device_config_t vei8_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "vei8", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS v6.00PG - Revision QHW.10.01 (HP Sherwood-B)", + .internal_name = "vei8", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/vei8/QHW1001.BIN", "" } + }, + { + .name = "Award Modular BIOS v6.00PG - Revision R804", + .internal_name = "6110zu", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/vei8/r804.bin", "" } + }, + { .files_no = 0 } + } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t vei8_device = { + .name = "MiTAC/Trigon 6110Zu", + .internal_name = "vei8_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = vei8_config +}; + /* i440ZX */ int machine_at_vei8_init(const machine_t *model) { - int ret; + int ret = 0; + const char *fn; - ret = bios_load_linear("roms/machines/vei8/QHW1001.BIN", - 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/m_at_slot1_socket370.c b/src/machine/m_at_slot1_socket370.c index cf689fd08..a9006c5e7 100644 --- a/src/machine/m_at_slot1_socket370.c +++ b/src/machine/m_at_slot1_socket370.c @@ -39,17 +39,81 @@ #include <86box/snd_ac97.h> /* i440BX */ +static const device_config_t prosignias31x_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "prosignias31x_bx", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS v4.51PG - Revision 5.3", + .internal_name = "p6bxt", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/prosignias31x_bx/bxt53s.BIN", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision 5.5 (Compaq ProSignia/Deskpro 440BX)", + .internal_name = "prosignias31x_bx", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/prosignias31x_bx/p6bxt-ap-092600.bin", "" } + }, + { + .name = "Phoenix - AwardBIOS v6.00PG - Unofficial Version 6.0 (by rushieda)", + .internal_name = "p6bxt_600pg", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/prosignias31x_bx/p6bxtap-600-67b8bfdce5de3470118202.bin", "" } + }, + { .files_no = 0 } + } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t prosignias31x_device = { + .name = "ECS P6BXT-A+", + .internal_name = "prosignias31x_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = prosignias31x_config +}; + int machine_at_prosignias31x_bx_init(const machine_t *model) { - int ret; + int ret = 0; + const char *fn; - ret = bios_load_linear("roms/machines/prosignias31x_bx/p6bxt-ap-092600.bin", - 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/m_at_socket4.c b/src/machine/m_at_socket4.c index d518ac5dd..1d77d99a4 100644 --- a/src/machine/m_at_socket4.c +++ b/src/machine/m_at_socket4.c @@ -158,17 +158,72 @@ machine_at_excaliburpci_init(const machine_t *model) return ret; } +static const device_config_t p5mp3_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "p5mp3", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS v4.50 - Revision 0205", + .internal_name = "p5mp3", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/p5mp3/0205.bin", "" } + }, + { + .name = "Award Modular BIOS v4.51G - Revision 0402 (Beta)", + .internal_name = "p5mp3_beta", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/p5mp3/0402.001", "" } + }, + { .files_no = 0 } + } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t p5mp3_device = { + .name = "ASUS P/I-P5MP3", + .internal_name = "p5mp3_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = p5mp3_config +}; + int machine_at_p5mp3_init(const machine_t *model) { - int ret; + int ret = 0; + const char *fn; - ret = bios_load_linear("roms/machines/p5mp3/0205.bin", - 0x000e0000, 131072, 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, 0x000e0000, 131072, 0); + device_context_restore(); + machine_at_common_init(model); pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); diff --git a/src/machine/m_at_socket5.c b/src/machine/m_at_socket5.c index 1d8f50a76..50a28a9c8 100644 --- a/src/machine/m_at_socket5.c +++ b/src/machine/m_at_socket5.c @@ -566,7 +566,7 @@ static const device_config_t pt2000_config[] = { .bios = { { .name = "Award Modular BIOS v4.50GP - Revision T1.01", - .internal_name = "pt2000_450gp", + .internal_name = "pt2000", .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, @@ -575,7 +575,7 @@ static const device_config_t pt2000_config[] = { }, { .name = "Award Modular BIOS v4.51PG - Revision 3.072C806", - .internal_name = "pt2000", + .internal_name = "pt2000_451pg", .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index fb24f5a43..02461d072 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -690,7 +690,7 @@ static const device_config_t ms5119_config[] = { }, { .name = "Award Modular BIOS v4.51PG - Release 2.3 (by Rainbow)", - .internal_name = "ms5119_v451pg", + .internal_name = "ms5119_451pg", .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, @@ -871,7 +871,7 @@ static const device_config_t fmb_config[] = { }, { .name = "Award Modular BIOS v4.51PG - 2001 Release (by Rainbow)", - .internal_name = "fmb_v451pg", + .internal_name = "fmb_451pg", .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, diff --git a/src/machine/m_at_sockets7.c b/src/machine/m_at_sockets7.c index 07b3c59af..550da59b9 100644 --- a/src/machine/m_at_sockets7.c +++ b/src/machine/m_at_sockets7.c @@ -200,7 +200,7 @@ static const device_config_t g5x_config[] = { }, { .name = "Phoenix - AwardBIOS v6.00PG - Release 4.1 (by eSupport)", - .internal_name = "5ax_esupport", + .internal_name = "5ax_600pg", .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, @@ -312,7 +312,7 @@ static const device_config_t delhi3_config[] = { .bios = { { .name = "AMIBIOS 6 (071595) - Revision 1.01", - .internal_name = "delhi3", + .internal_name = "delhi3_nonoem", .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, @@ -321,7 +321,7 @@ static const device_config_t delhi3_config[] = { }, { .name = "AMIBIOS 6 (071595) - Revision 1.20 (eMachines eTower 3__k)", - .internal_name = "etower", + .internal_name = "delhi3", .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 7333e6846..e65db4fa4 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -6627,7 +6627,7 @@ const machine_t machines[] = { }, /* Has AMIKey 'F' KBC firmware. */ { - .name = "[OPTi 391] DataExpert 386WB", + .name = "[OPTi 391] DataExpert 386C", .internal_name = "dataexpert386wb", .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_OPTI_391, @@ -6661,7 +6661,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &dataexpert386wb_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -11350,7 +11350,7 @@ const machine_t machines[] = { .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &p5mp3_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -17433,7 +17433,7 @@ const machine_t machines[] = { .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, /* Machine has internal SCSI: Adaptec AIC-7880U */ .ram = { - .min = 40960, + .min = 8192, .max = 524288, .step = 8192 }, @@ -18408,7 +18408,7 @@ const machine_t machines[] = { /* Has a SM(S)C FDC37M60x Super I/O chip with on-chip KBC with most likely AMIKey-2 KBC firmware. */ { - .name = "[i440ZX] HP Sherwood-B (MiTAC/Trigon 6110Zu)", + .name = "[i440ZX] MiTAC/Trigon 6110Zu", .internal_name = "vei8", .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440ZX, @@ -18442,7 +18442,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &vei8_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -18910,13 +18910,12 @@ const machine_t machines[] = { /* Slot 1/Socket 370 machines */ /* 440BX */ - /* OEM version of ECS P6BXT-A+ REV 1.3x/2.2x. Has a Winbond W83977EF Super - I/O chip with on-chip KBC with AMIKey-2 KBC firmware.*/ + /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware.*/ { - .name = "[i440BX] Compaq ProSignia S316/318 (Intel)", + .name = "[i440BX] ECS P6BXT-A+", .internal_name = "prosignias31x_bx", .type = MACHINE_TYPE_SLOT1_370, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133, + .chipset = MACHINE_CHIPSET_INTEL_440BX, .init = machine_at_prosignias31x_bx_init, .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, @@ -18924,9 +18923,9 @@ const machine_t machines[] = { .gpio_acpi_handler = NULL, .cpu = { .package = CPU_PKG_SLOT1 | CPU_PKG_SOCKET370, - .block = CPU_BLOCK(CPU_PENTIUMPRO, CPU_CYRIX3S), /* Instability issues with PPro, and garbled text in POST with Cyrix */ + .block = CPU_BLOCK(CPU_PENTIUMPRO), /* Instability issues with PPro, and garbled text in POST with Cyrix (latter supported on unofficial v6.00PG BIOS) */ .min_bus = 66666667, - .max_bus = 100000000, + .max_bus = 124242424, .min_voltage = 1300, .max_voltage = 3500, .min_multi = 1.5, @@ -18947,7 +18946,7 @@ const machine_t machines[] = { .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &prosignias31x_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL,