Add the selection of the last BIOS versio of ABIT BX6.

This commit is contained in:
OBattler
2025-09-13 23:09:24 +02:00
parent ccc5c3aec1
commit fcf236ff7e
3 changed files with 49 additions and 6 deletions

View File

@@ -1128,6 +1128,9 @@ extern int machine_at_p6i440e2_init(const machine_t *);
/* i440BX */
extern int machine_at_bf6_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t bx6_device;
#endif
extern int machine_at_bx6_init(const machine_t *);
extern int machine_at_ax6bc_init(const machine_t *);
extern int machine_at_p2bls_init(const machine_t *);

View File

@@ -348,17 +348,57 @@ machine_at_bf6_init(const machine_t *model)
return ret;
}
static const device_config_t bx6_config[] = {
// clang-format off
{
.name = "bios",
.description = "BIOS Version",
.type = CONFIG_BIOS,
.default_string = "bx6",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.bios = {
{ .name = "1998/07/28 - BIOS EG", .internal_name = "bx6", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/bx6/BX6_EG.BIN", "" } },
{ .name = "2000/03/10 - BIOS QS", .internal_name = "bx6_qs", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/bx6/BX6_QS.bin", "" } },
{ .files_no = 0 }
},
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
const device_t bx6_device = {
.name = "ABIT BX6",
.internal_name = "bx6_device",
.flags = 0,
.local = 0,
.init = NULL,
.close = NULL,
.reset = NULL,
.available = NULL,
.speed_changed = NULL,
.force_redraw = NULL,
.config = bx6_config
};
int
machine_at_bx6_init(const machine_t *model)
{
int ret;
int ret = 0;
const char* fn;
ret = bios_load_linear("roms/machines/bx6/BX6_EG.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_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);

View File

@@ -17491,7 +17491,7 @@ const machine_t machines[] = {
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.device = &bx6_device,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,