Finished the great internal machine reorganization and added the FIC PO-6000.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/ibm_5161.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/port_6x.h>
|
||||
#define USE_SIO_DETECT
|
||||
@@ -40,10 +41,310 @@
|
||||
#include <86box/serial.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_cga.h>
|
||||
#include <86box/vid_cga_comp.h>
|
||||
#include <86box/flash.h>
|
||||
#include <86box/machine.h>
|
||||
|
||||
/* ISA */
|
||||
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", "" }
|
||||
},
|
||||
// The following are Diagnostic ROMs.
|
||||
{
|
||||
.name = "Supersoft Diagnostics",
|
||||
.internal_name = "diag_supersoft",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 2,
|
||||
.local = 2,
|
||||
.size = 65536,
|
||||
.files = { "roms/machines/diagnostic/5170_EVEN_LOW_U27_27256.bin", "roms/machines/diagnostic/5170_ODD_HIGH_U47_27256.bin", "" }
|
||||
},
|
||||
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "enable_5161",
|
||||
.description = "IBM 5161 Expansion Unit",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 0
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t ibmat_device = {
|
||||
.name = "IBM AT",
|
||||
.internal_name = "ibmat_device",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = ibmat_config
|
||||
};
|
||||
|
||||
static void
|
||||
machine_at_ibm_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init_ex(model, 1);
|
||||
|
||||
device_add(&kbc_at_device);
|
||||
|
||||
mem_remap_top(384);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ibmat_init(const machine_t *model)
|
||||
{
|
||||
int ret = 0;
|
||||
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();
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
if (enable_5161)
|
||||
device_add(&ibm_5161_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const device_config_t ibmxt286_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "enable_5161",
|
||||
.description = "IBM 5161 Expansion Unit",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 0
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t ibmxt286_device = {
|
||||
.name = "IBM XT Model 286",
|
||||
.internal_name = "ibmxt286_device",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = ibmxt286_config
|
||||
};
|
||||
|
||||
int
|
||||
machine_at_ibmxt286_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
uint8_t enable_5161;
|
||||
|
||||
device_context(model->device);
|
||||
enable_5161 = machine_get_config_int("enable_5161");
|
||||
device_context_restore();
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin",
|
||||
"roms/machines/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
if (enable_5161)
|
||||
device_add(&ibm_5161_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ibmatami_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN",
|
||||
"roms/machines/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_cmdpc_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/cmdpc30/commodore pc 30 iii even.bin",
|
||||
"roms/machines/cmdpc30/commodore pc 30 iii odd.bin",
|
||||
0x000f8000, 32768, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_init(model);
|
||||
|
||||
mem_remap_top(384);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&cbm_io_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_portableii_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleavedr("roms/machines/portableii/109740-001.rom",
|
||||
"roms/machines/portableii/109739-001.rom",
|
||||
0x000f8000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
video_reset(gfxcard[0]);
|
||||
|
||||
device_add(&compaq_device);
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&kbc_at_compaq_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_portableiii_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linearr("roms/machines/portableiii/K Combined.bin",
|
||||
0x000f8000, 65536, 0);
|
||||
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
video_reset(gfxcard[0]);
|
||||
|
||||
if (hdc_current[0] == HDC_INTERNAL)
|
||||
device_add(&ide_isa_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&compaq_plasma_device);
|
||||
|
||||
device_add(&compaq_device);
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&kbc_at_compaq_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_grid1520_init(const machine_t *model) {
|
||||
int ret = 0;
|
||||
|
||||
ret = bios_load_linear("roms/machines/grid1520/grid1520_891025.rom",
|
||||
0x000f8000, 0x8000, 0);
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_ide_init(model);
|
||||
mem_remap_top(384);
|
||||
|
||||
device_add(&kbc_at_device);
|
||||
// for now just select CGA with amber monitor
|
||||
//device_add(&cga_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&grid1520_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_mr286_init(const machine_t *model)
|
||||
{
|
||||
@@ -115,6 +416,80 @@ machine_at_m290_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ibmatpx_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Even.bin",
|
||||
"roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Odd.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ibmatquadtel_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ibmatquadtel/BIOS_30MAR90_U27_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN",
|
||||
"roms/machines/ibmatquadtel/BIOS_30MAR90_U47_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_pb286_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/pb286/LB_V332P.BIN",
|
||||
"roms/machines/pb286/HB_V332P.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_siemens_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/siemens/286BIOS.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 1);
|
||||
|
||||
device_add(&kbc_at_siemens_device);
|
||||
|
||||
mem_remap_top(384);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* C&T PC/AT */
|
||||
static void
|
||||
machine_at_ctat_common_init(const machine_t *model)
|
||||
|
||||
Reference in New Issue
Block a user