Biostar M5ATA: Add the option for the latest BIOS revision.
This commit is contained in:
@@ -1056,6 +1056,9 @@ extern int machine_at_sq578_init(const machine_t *);
|
||||
extern int machine_at_ms5172_init(const machine_t *);
|
||||
|
||||
/* ALi ALADDiN IV+ */
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t m5ata_device;
|
||||
#endif
|
||||
extern int machine_at_m5ata_init(const machine_t *);
|
||||
extern int machine_at_ms5164_init(const machine_t *);
|
||||
extern int machine_at_m560_init(const machine_t *);
|
||||
|
||||
@@ -1702,17 +1702,57 @@ machine_at_ms5172_init(const machine_t *model)
|
||||
}
|
||||
|
||||
/* ALi ALADDiN IV+ */
|
||||
static const device_config_t m5ata_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "bios",
|
||||
.description = "BIOS Version",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "m5ata",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.bios = {
|
||||
{ .name = "12/23/97", .internal_name = "m5ata", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/m5ata/ATA1223.BIN", "" } },
|
||||
{ .name = "05/27/98", .internal_name = "m5ata_0527b", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/m5ata/ATA0527B.BIN", "" } },
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t m5ata_device = {
|
||||
.name = "Biostar M5ATA",
|
||||
.internal_name = "m5ata_device",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = m5ata_config
|
||||
};
|
||||
|
||||
int
|
||||
machine_at_m5ata_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
int ret = 0;
|
||||
const char* fn;
|
||||
|
||||
ret = bios_load_linear("roms/machines/m5ata/ATA1223.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);
|
||||
|
||||
@@ -15777,7 +15777,7 @@ const machine_t machines[] = {
|
||||
.kbc_p1 = 0x00000cf0,
|
||||
.gpio = 0xffffffff,
|
||||
.gpio_acpi = 0xffffffff,
|
||||
.device = NULL,
|
||||
.device = &m5ata_device,
|
||||
.kbd_device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
|
||||
Reference in New Issue
Block a user