Add other BIOS versions to ibmxt (82)
This commit is contained in:
@@ -267,12 +267,45 @@ machine_pc82_init(const machine_t *model)
|
|||||||
|
|
||||||
static const device_config_t ibmxt_config[] = {
|
static const device_config_t ibmxt_config[] = {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
|
{
|
||||||
|
.name = "bios",
|
||||||
|
.description = "BIOS Version",
|
||||||
|
.type = CONFIG_BIOS,
|
||||||
|
.default_string = "ibm5160_1501512_5000027",
|
||||||
|
.default_int = 0,
|
||||||
|
.file_filter = "",
|
||||||
|
.spinner = { 0 },
|
||||||
|
.bios = {
|
||||||
|
{ .name = "1501512 (11/08/82)", .internal_name = "ibm5160_1501512_5000027", .bios_type = BIOS_NORMAL,
|
||||||
|
.files_no = 2, .local = 0, .size = 65536, .files = { "roms/machines/ibmxt/BIOS_5160_08NOV82_U18_1501512.BIN", "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } },
|
||||||
|
#if 0
|
||||||
|
{ .name = "1501512 (11/08/82) (Alt)", .internal_name = "ibm5160_1501512_6359116", .bios_type = BIOS_NORMAL,
|
||||||
|
.files_no = 2, .local = 0, .size = 65536, .files = { "roms/machines/ibmxt/BIOS_5160_08NOV82_U18_1501512.BIN", "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_6359116.BIN", "" } },
|
||||||
|
{ .name = "5000026 (08/16/82)", .internal_name = "ibm5160_5000026_5000027", .bios_type = BIOS_NORMAL,
|
||||||
|
.files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/ibmxt/BIOS_5160_16AUG82_U18_5000026.BIN", "roms/machines/ibmxt/BIOS_5160_16AUG82_U19_5000027.BIN", "" } },
|
||||||
|
// The following are Diagnostic ROMs.
|
||||||
|
{ .name = "Supersoft Diagnostics", .internal_name = "diag_supersoft", .bios_type = BIOS_NORMAL,
|
||||||
|
.files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/diagnostic/Supersoft_PCXT_8KB.bin", "" } },
|
||||||
|
{ .name = "Ruud's Diagnostic Rom", .internal_name = "diag_ruuds", .bios_type = BIOS_NORMAL,
|
||||||
|
.files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/diagnostic/ruuds_diagnostic_rom_v5.3_8kb.bin", "" } },
|
||||||
|
{ .name = "XT RAM Test", .internal_name = "diag_xtramtest", .bios_type = BIOS_NORMAL,
|
||||||
|
.files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/diagnostic/xtramtest_8k.bin", "" } },
|
||||||
|
#endif
|
||||||
|
{ .files_no = 0 }
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.name = "enable_5161",
|
.name = "enable_5161",
|
||||||
.description = "IBM 5161 Expansion Unit",
|
.description = "IBM 5161 Expansion Unit",
|
||||||
.type = CONFIG_BINARY,
|
.type = CONFIG_BINARY,
|
||||||
.default_int = 1
|
.default_int = 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.name = "enable_basic",
|
||||||
|
.description = "IBM Cassette Basic",
|
||||||
|
.type = CONFIG_BINARY,
|
||||||
|
.default_int = 1
|
||||||
|
},
|
||||||
{ .name = "", .description = "", .type = CONFIG_END }
|
{ .name = "", .description = "", .type = CONFIG_END }
|
||||||
// clang-format on
|
// clang-format on
|
||||||
};
|
};
|
||||||
@@ -294,26 +327,28 @@ const device_t ibmxt_device = {
|
|||||||
int
|
int
|
||||||
machine_xt_init(const machine_t *model)
|
machine_xt_init(const machine_t *model)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
uint8_t enable_5161;
|
uint8_t enable_5161;
|
||||||
uint8_t enable_basic;
|
uint8_t enable_basic;
|
||||||
|
const char *fn;
|
||||||
|
|
||||||
|
/* No ROMs available. */
|
||||||
|
if (!device_available(model->device))
|
||||||
|
return ret;
|
||||||
|
|
||||||
device_context(model->device);
|
device_context(model->device);
|
||||||
enable_5161 = machine_get_config_int("enable_5161");
|
enable_5161 = machine_get_config_int("enable_5161");
|
||||||
device_context_restore();
|
enable_basic = machine_get_config_int("enable_basic");
|
||||||
|
fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0);
|
||||||
|
ret = bios_load_linear(fn, 0x000fe000, 65536, 0x6000);
|
||||||
|
|
||||||
ret = bios_load_linear("roms/machines/ibmxt/xt.rom",
|
if (enable_basic && ret) {
|
||||||
0x000f0000, 65536, 0);
|
fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0);
|
||||||
if (!ret) {
|
(void) bios_load_aux_linear(fn, 0x000f8000, 24576, 0);
|
||||||
ret = bios_load_linear("roms/machines/ibmxt/1501512.u18",
|
fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 1);
|
||||||
0x000fe000, 65536, 0x6000);
|
(void) bios_load_aux_linear(fn, 0x000f0000, 32768, 0);
|
||||||
if (ret) {
|
|
||||||
bios_load_aux_linear("roms/machines/ibmxt/1501512.u18",
|
|
||||||
0x000f8000, 24576, 0);
|
|
||||||
bios_load_aux_linear("roms/machines/ibmxt/5000027.u19",
|
|
||||||
0x000f0000, 32768, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
device_context_restore();
|
||||||
|
|
||||||
if (bios_only || !ret)
|
if (bios_only || !ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user