CONFIG_BIOS for ibmat (5170)

This commit is contained in:
Jasmine Iwanek
2025-01-15 23:45:00 -05:00
parent 3189bf7fb8
commit b61751a6d0

View File

@@ -153,6 +153,29 @@ machine_at_ps2_ide_init(const machine_t *model)
static const device_config_t ibmat_config[] = {
// clang-format off
{
.name = "bios",
.description = "BIOS Version",
.type = CONFIG_BIOS,
.default_string = "ibm5170_111585",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.bios = {
{ .name = "62X082x (11/15/85)", .internal_name = "ibm5170_111585", .bios_type = BIOS_NORMAL,
.files_no = 2, .local = 0, .size = 65536, .files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47.BIN", "" } },
{ .name = "61X9266 (11/15/85) (Alt)", .internal_name = "ibm5170_111585_alt", .bios_type = BIOS_NORMAL,
.files_no = 2, .local = 0, .size = 65536, .files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27_61X9266.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47_61X9265.BIN", "" } },
{ .name = "648009x (06/10/85)", .internal_name = "ibm5170_061085", .bios_type = BIOS_NORMAL,
.files_no = 2, .local = 0, .size = 65536, .files = { "roms/machines/ibmat/BIOS_5170_10JUN85_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JUN85_U47.BIN", "" } },
{ .name = "618102x (01/10/84)", .internal_name = "ibm5170_011084", .bios_type = BIOS_NORMAL,
.files_no = 2, .local = 0, .size = 65536, .files = { "roms/machines/ibmat/BIOS_5170_10JAN84_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JAN84_U47.BIN", "" } },
{ .files_no = 0 }
},
},
{
.name = "enable_5161",
.description = "IBM 5161 Expansion Unit",
@@ -180,17 +203,21 @@ const device_t ibmat_device = {
int
machine_at_ibm_init(const machine_t *model)
{
int ret;
uint8_t enable_5161;
int ret;
uint8_t enable_5161;
const char *fn[2];
/* No ROMs available. */
if (!device_available(model->device))
return ret;
device_context(model->device);
enable_5161 = machine_get_config_int("enable_5161");
fn[0] = device_get_bios_file(model->device, device_get_config_bios("bios"), 0);
fn[1] = device_get_bios_file(model->device, device_get_config_bios("bios"), 1);
ret = bios_load_interleaved(fn[0], fn[1], 0x000f0000, 65536, 0);
device_context_restore();
ret = bios_load_interleaved("roms/machines/ibmat/62x0820.u27",
"roms/machines/ibmat/62x0821.u47",
0x000f0000, 65536, 0);
if (bios_only || !ret)
return ret;