From a3f5ea358fed81bf5b08fbd86dfa82a50194e27d Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 26 Aug 2025 18:00:25 +0200 Subject: [PATCH] Machine mergers and added the Olivetti PCS 44/C. --- src/include/86box/machine.h | 62 ++- src/include/86box/video.h | 1 + src/machine/m_at_286.c | 38 +- src/machine/m_at_386dx.c | 81 +-- src/machine/m_at_386dx_486.c | 81 +-- src/machine/m_at_386sx.c | 68 ++- src/machine/m_at_socket1.c | 29 + src/machine/m_at_socket3.c | 100 ++-- src/machine/m_at_socket3_pci.c | 85 +-- src/machine/m_at_socket4.c | 156 +++--- src/machine/m_at_socket5.c | 93 ++-- src/machine/m_at_socket7.c | 192 ++++--- src/machine/m_at_socket7_3v.c | 256 +++++---- src/machine/m_at_socket8.c | 135 ++--- src/machine/machine_table.c | 964 +++++---------------------------- src/video/vid_oak_oti.c | 47 +- 16 files changed, 958 insertions(+), 1430 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index acba9cd45..b6acf140f 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -494,8 +494,6 @@ extern int machine_at_ibmat_init(const machine_t *); extern const device_t ibmxt286_device; #endif extern int machine_at_ibmxt286_init(const machine_t *); -/* IBM AT with AMI BIOS */ -extern int machine_at_ibmatami_init(const machine_t *); extern int machine_at_cmdpc_init(const machine_t *); extern int machine_at_portableii_init(const machine_t *); extern int machine_at_portableiii_init(const machine_t *); @@ -503,15 +501,14 @@ extern int machine_at_grid1520_init(const machine_t *); extern int machine_at_mr286_init(const machine_t *); extern int machine_at_pc8_init(const machine_t *); extern int machine_at_m290_init(const machine_t *); -/* IBM AT with Phoenix BIOS */ -extern int machine_at_ibmatpx_init(const machine_t *); -/* IBM AT with Quadtel BIOS */ -extern int machine_at_ibmatquadtel_init(const machine_t *); +extern int machine_at_pxat_init(const machine_t *); +extern int machine_at_quadtat_init(const machine_t *); extern int machine_at_pb286_init(const machine_t *); extern int machine_at_mbc17_init(const machine_t *); extern int machine_at_ax286_init(const machine_t *); /* Siemens PCD-2L. N82330 discrete machine. It segfaults in some places */ extern int machine_at_siemens_init(const machine_t *); +extern int machine_at_tbunk286_init(const machine_t *); /* C&T PC/AT */ extern int machine_at_dells200_init(const machine_t *); @@ -563,8 +560,10 @@ extern int machine_at_pbl300sx_init(const machine_t *); extern int machine_at_arb1374_init(const machine_t *); extern int machine_at_sbc350a_init(const machine_t *); extern int machine_at_flytech386_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t c325ax_device; +#endif extern int machine_at_325ax_init(const machine_t *); -extern int machine_at_mr1217_init(const machine_t *); /* ALi M1409 */ extern int machine_at_acer100t_init(const machine_t *); @@ -611,8 +610,10 @@ extern int machine_at_prox1332_init(const machine_t *); /* m_at_386dx.c */ /* ISA */ +#ifdef EMU_DEVICE_H +extern const device_t deskpro386_device; +#endif extern int machine_at_deskpro386_init(const machine_t *); -extern int machine_at_deskpro386_05_1988_init(const machine_t *); extern int machine_at_portableiii386_init(const machine_t *); extern int machine_at_micronics386_init(const machine_t *); extern int machine_at_micronics386px_init(const machine_t *); @@ -648,8 +649,10 @@ extern int machine_at_exp4349_init(const machine_t *); /* OPTi 495SX */ extern int machine_at_c747_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t opti495_ami_device; +#endif extern int machine_at_opti495_ami_init(const machine_t *); -extern int machine_at_opti495_mr_init(const machine_t *); /* m_at_common.c */ extern void machine_at_common_init_ex(const machine_t *, int type); @@ -697,6 +700,7 @@ extern int machine_at_vect486vl_init(const machine_t *); extern int machine_at_d824_init(const machine_t *); /* VLSI 82C486 */ +extern int machine_at_pcs44c_init(const machine_t *); extern int machine_at_tuliptc38_init(const machine_t *); /* ZyMOS Poach */ @@ -743,6 +747,9 @@ extern int machine_at_4gpv5_init(const machine_t *); extern int machine_at_greenb_init(const machine_t *); /* OPTi 895 */ +#ifdef EMU_DEVICE_H +extern const device_t j403tg_device; +#endif extern int machine_at_403tg_init(const machine_t *); extern int machine_at_403tg_d_init(const machine_t *); extern int machine_at_403tg_d_mr_init(const machine_t *); @@ -774,7 +781,9 @@ extern int machine_at_tf486_init(const machine_t *); extern int machine_at_ms4145_init(const machine_t *); /* OPTi 802G */ -extern int machine_at_aptiva510_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t pc330_6573_device; +#endif extern int machine_at_pc330_6573_init(const machine_t *); /* OPTi 895 */ @@ -854,14 +863,16 @@ extern int machine_at_pcm5330_init(const machine_t *); extern const device_t v12p_device; #endif extern int machine_at_v12p_init(const machine_t *); -extern int machine_at_ambradp60_init(const machine_t *); extern int machine_at_excaliburpci_init(const machine_t *); extern int machine_at_p5mp3_init(const machine_t *); -extern int machine_at_dellxp60_init(const machine_t *); extern int machine_at_opti560l_init(const machine_t *); extern void machine_at_award_common_init(const machine_t *); extern int machine_at_586is_init(const machine_t *); extern int machine_at_valuepointp60_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t batman_device; +#endif +extern int machine_at_batman_init(const machine_t *); extern void machine_at_premiere_common_init(const machine_t *, int); extern int machine_at_revenge_init(const machine_t *); extern int machine_at_m5pi_init(const machine_t *); @@ -884,10 +895,11 @@ extern int machine_at_pci56001_init(const machine_t *); /* m_at_socket5.c */ /* i430NX */ -extern int machine_at_ambradp90_init(const machine_t *); extern int machine_at_p54np4_init(const machine_t *); -extern int machine_at_dellplato_init(const machine_t *); extern int machine_at_586ip_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t plato_device; +#endif extern int machine_at_plato_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t d842_device; @@ -923,13 +935,16 @@ extern int machine_at_hot539_init(const machine_t *); /* m_at_socket7_3v.c */ /* i430FX */ +#ifdef EMU_DEVICE_H +extern const device_t p54tp4xe_device; +#endif extern int machine_at_p54tp4xe_init(const machine_t *); -extern int machine_at_p54tp4xe_mr_init(const machine_t *); extern int machine_at_exp8551_init(const machine_t *); -extern int machine_at_gw2katx_init(const machine_t *); extern int machine_at_vectra54_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t thor_device; +#endif extern int machine_at_thor_init(const machine_t *); -extern int machine_at_mrthor_init(const machine_t *); extern uint32_t machine_at_endeavor_gpio_handler(uint8_t write, uint32_t val); extern int machine_at_endeavor_init(const machine_t *); extern int machine_at_ms5119_init(const machine_t *); @@ -972,14 +987,18 @@ extern int machine_at_p55t2p4_init(const machine_t *); extern void machine_at_p65up5_common_init(const machine_t *, const device_t *northbridge); #endif extern int machine_at_p65up5_cp55t2d_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t cu430hx_device; +#endif extern int machine_at_cu430hx_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t tc430hx_device; +#endif extern int machine_at_tc430hx_init(const machine_t *); extern int machine_at_m7shi_init(const machine_t *); extern int machine_at_epc2102_init(const machine_t *); extern int machine_at_pcv90_init(const machine_t *); extern int machine_at_p55t2s_init(const machine_t *); -extern int machine_at_equium5200_init(const machine_t *); -extern int machine_at_infinia7200_init(const machine_t *); /* i430VX */ extern int machine_at_ap5vm_init(const machine_t *); @@ -1072,10 +1091,11 @@ extern int machine_at_ficpo6000_init(const machine_t *); extern int machine_at_acerv60n_init(const machine_t *); extern int machine_at_p65up5_cp6nd_init(const machine_t *); extern int machine_at_8600ttc_init(const machine_t *); -extern int machine_at_dellvenus_init(const machine_t *); -extern int machine_at_gw2kvenus_init(const machine_t *); extern int machine_at_686nx_init(const machine_t *); extern int machine_at_ap440fx_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vs440fx_device; +#endif extern int machine_at_vs440fx_init(const machine_t *); extern int machine_at_lgibmx61_init(const machine_t *); extern int machine_at_m6mi_init(const machine_t *); diff --git a/src/include/86box/video.h b/src/include/86box/video.h index a284d12fa..b5be81bbb 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -490,6 +490,7 @@ extern const device_t oti067_device; extern const device_t oti067_acer386_device; extern const device_t oti067_ama932j_device; extern const device_t oti077_acer100t_device; +extern const device_t oti077_pcs44c_device; extern const device_t oti077_device; /* Paradise/WD (S)VGA */ diff --git a/src/machine/m_at_286.c b/src/machine/m_at_286.c index c85c392b8..f74ad5115 100644 --- a/src/machine/m_at_286.c +++ b/src/machine/m_at_286.c @@ -224,23 +224,6 @@ machine_at_ibmxt286_init(const machine_t *model) 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) { @@ -434,7 +417,7 @@ machine_at_m290_init(const machine_t *model) } int -machine_at_ibmatpx_init(const machine_t *model) +machine_at_pxat_init(const machine_t *model) { int ret; @@ -451,7 +434,7 @@ machine_at_ibmatpx_init(const machine_t *model) } int -machine_at_ibmatquadtel_init(const machine_t *model) +machine_at_quadtat_init(const machine_t *model) { int ret; @@ -551,6 +534,23 @@ machine_at_siemens_init(const machine_t *model) return ret; } +int +machine_at_tbunk286_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; +} + /* C&T PC/AT */ static void machine_at_ctat_common_init(const machine_t *model) diff --git a/src/machine/m_at_386dx.c b/src/machine/m_at_386dx.c index 90461d554..9cb7c5223 100644 --- a/src/machine/m_at_386dx.c +++ b/src/machine/m_at_386dx.c @@ -57,9 +57,56 @@ machine_compaq_p1_handler(void) return machine_generic_p1_handler() | (hasfpu ? 0x00 : 0x04); } -static void -machine_at_deskpro386_common_init(const machine_t *model) +static const device_config_t deskpro386_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "deskpro386", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "September 1986", .internal_name = "deskpro386", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/deskpro386/1986-09-04-HI.json.bin", "" } }, + { .name = "May 1988", .internal_name = "deskpro386_05_1988", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/deskpro386/1988-05-10.json.bin", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t deskpro386_device = { + .name = "Compaq Deskpro 386", + .internal_name = "deskpro386_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = deskpro386_config +}; + +int +machine_at_deskpro386_init(const machine_t *model) { + int ret = 0; + const char* fn; + + /* 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_linearr(fn, 0x000f8000, 65536, 0); + if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); @@ -70,36 +117,6 @@ machine_at_deskpro386_common_init(const machine_t *model) machine_at_common_init(model); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); -} - -int -machine_at_deskpro386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linearr("roms/machines/deskpro386/1986-09-04-HI.json.bin", - 0x000f8000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_deskpro386_common_init(model); - - return ret; -} - -int -machine_at_deskpro386_05_1988_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linearr("roms/machines/deskpro386/1988-05-10.json.bin", - 0x000f8000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_deskpro386_common_init(model); return ret; } diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index f4fb1f713..2942180bb 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -100,9 +100,56 @@ machine_at_c747_init(const machine_t *model) return ret; } -static void -machine_at_opti495_ami_common_init(const machine_t *model) +static const device_config_t opti495_ami_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "ami495", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMI 060692", .internal_name = "ami495", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/ami495/opt495sx.ami", "" } }, + { .name = "MR BIOS V1.60", .internal_name = "mr495", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/ami495/opt495sx.mr", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t opti495_ami_device = { + .name = "DataExpert SX495", + .internal_name = "opti495_ami_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = opti495_ami_config +}; + +int +machine_at_opti495_ami_init(const machine_t *model) { + int ret = 0; + const char* fn; + + /* 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, 0x000f0000, 65536, 0); + machine_at_common_init(model); device_add(&opti495sx_device); @@ -111,36 +158,6 @@ machine_at_opti495_ami_common_init(const machine_t *model) if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); -} - -int -machine_at_opti495_ami_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ami495/opt495sx.ami", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_opti495_ami_common_init(model); - - return ret; -} - -int -machine_at_opti495_mr_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/mr495/opt495sx.mr", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_opti495_ami_common_init(model); return ret; } diff --git a/src/machine/m_at_386sx.c b/src/machine/m_at_386sx.c index 4aed9f0b1..e225ba0e7 100644 --- a/src/machine/m_at_386sx.c +++ b/src/machine/m_at_386sx.c @@ -231,37 +231,55 @@ machine_at_flytech386_init(const machine_t *model) return ret; } +static const device_config_t c325ax_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "325ax", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMIBIOS 070791", .internal_name = "325ax", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/325ax/M27C512.BIN", "" } }, + { .name = "MR BIOS V1.41", .internal_name = "mr1217", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/325ax/mrbios.BIN", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t c325ax_device = { + .name = "Chaintech 325AX", + .internal_name = "325ax_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = c325ax_config +}; + int machine_at_325ax_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn; - ret = bios_load_linear("roms/machines/325ax/M27C512.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; - machine_at_common_init(model); - - device_add(&ali1217_device); - device_add(&fdc_at_device); - - device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); - - return ret; -} - -int -machine_at_mr1217_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/mr1217/mrbios.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - 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, 0x000f0000, 65536, 0); machine_at_common_init(model); diff --git a/src/machine/m_at_socket1.c b/src/machine/m_at_socket1.c index 4357a1b42..f2d75fd72 100644 --- a/src/machine/m_at_socket1.c +++ b/src/machine/m_at_socket1.c @@ -343,6 +343,35 @@ machine_at_d824_init(const machine_t *model) } /* VLSI 82C486 */ +int +machine_at_pcs44c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pcs44c/V032004G.25", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + device_add(&vl82c486_device); + device_add(&tulip_jumper_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&oti077_pcs44c_device); + + device_add(&vl82c113_device); + + device_add(&ide_isa_device); + device_add_params(&pc873xx_device, (void *) (PCX73XX_IDE_PRI | PCX730X_398)); + + device_add(&intel_flash_bxt_device); + + return ret; +} + int machine_at_tuliptc38_init(const machine_t *model) { diff --git a/src/machine/m_at_socket3.c b/src/machine/m_at_socket3.c index 1d46ebe18..32cb77973 100644 --- a/src/machine/m_at_socket3.c +++ b/src/machine/m_at_socket3.c @@ -167,9 +167,59 @@ machine_at_greenb_init(const machine_t *model) } /* OPTi 895 */ -static void -machine_at_403tg_common_init(const machine_t *model, int nvr_hack) +static const device_config_t j403tg_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "403tg", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMI 060692", .internal_name = "403tg", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/403tg/403TG.BIN", "" } }, + { .name = "AMI 060692", .internal_name = "403tg_d", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/403tg/J403TGRevD.BIN", "" } }, + { .name = "AMI 060692", .internal_name = "403tg_d_mr", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/403tg/MRBiosOPT895.bin", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t j403tg_device = { + .name = "Jetway J-403TG", + .internal_name = "403tg_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = j403tg_config +}; + +int +machine_at_403tg_init(const machine_t *model) { + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + int nvr_hack = !strcmp(device_get_config_bios("bios"), "403tg_d"); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000f0000, 65536, 0); + if (nvr_hack) { machine_at_common_init_ex(model, 2); device_add(&ami_1994_nvr_device); @@ -182,52 +232,6 @@ machine_at_403tg_common_init(const machine_t *model, int nvr_hack) if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); -} - -int -machine_at_403tg_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/403tg/403TG.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_403tg_common_init(model, 0); - - return ret; -} - -int -machine_at_403tg_d_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/403tg_d/J403TGRevD.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_403tg_common_init(model, 1); - - return ret; -} - -int -machine_at_403tg_d_mr_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/403tg_d/MRBiosOPT895.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_403tg_common_init(model, 0); return ret; } diff --git a/src/machine/m_at_socket3_pci.c b/src/machine/m_at_socket3_pci.c index 54f8690ae..3182537c1 100644 --- a/src/machine/m_at_socket3_pci.c +++ b/src/machine/m_at_socket3_pci.c @@ -287,9 +287,57 @@ machine_at_ms4145_init(const machine_t *model) } /* OPTi 802G */ -static void -machine_at_pc330_6573_common_init(const machine_t *model) +static const device_config_t pc330_6573_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "pc330_6573", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "IBM Aptiva 510/710/Vision", .internal_name = "aptiva510", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pc330_6573/aptiva510_$IMAGES.USF", "" } }, + { .name = "IBM PC 330 (type 6573)", .internal_name = "pc330_6573", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pc330_6573/$IMAGES.USF", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t pc330_6573_device = { + .name = "IBM PC 330 (type 6573)", + .internal_name = "pc330_6573_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = pc330_6573_config +}; + +int +machine_at_pc330_6573_init(const machine_t *model) { + int ret = 0; + const char* fn; + + /* 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); device_add(&ide_vlb_2ch_device); @@ -315,36 +363,6 @@ machine_at_pc330_6573_common_init(const machine_t *model) device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); device_add(&ide_opti611_vlb_device); device_add(&intel_flash_bxt_device); -} - -int -machine_at_aptiva510_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/aptiva510/$IMAGES.USF", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_pc330_6573_common_init(model); - - return ret; -} - -int -machine_at_pc330_6573_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pc330_6573/$IMAGES.USF", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_pc330_6573_common_init(model); return ret; } @@ -1374,9 +1392,6 @@ machine_at_hot433a_init(const machine_t *model) ret = bios_load_linear(fn, 0x000e0000, 131072, 0); device_context_restore(); - if (bios_only || !ret) - return ret; - machine_at_common_init_ex(model, 2); if (is_award) device_add(&amstrad_megapc_nvr_device); diff --git a/src/machine/m_at_socket4.c b/src/machine/m_at_socket4.c index 2e5768cbc..9eec19755 100644 --- a/src/machine/m_at_socket4.c +++ b/src/machine/m_at_socket4.c @@ -110,40 +110,6 @@ machine_at_v12p_init(const machine_t *model) return ret; } -int -machine_at_ambradp60_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/ambradp60/1004AF1P.BIO", - "roms/machines/ambradp60/1004AF1P.BI1", - 0x1c000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - device_add(&amstrad_megapc_nvr_device); - device_add(&ide_pci_device); - - pci_init(PCI_CONFIG_TYPE_2); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); - device_add(&sio_zb_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); - device_add(&intel_flash_bxt_ami_device); - - device_add(&i430lx_device); - - return ret; -} - int machine_at_excaliburpci_init(const machine_t *model) { @@ -204,40 +170,6 @@ machine_at_p5mp3_init(const machine_t *model) return ret; } -int -machine_at_dellxp60_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_inverted("roms/machines/dellxp60/XP60-A08.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - device_add(&amstrad_megapc_nvr_device); - device_add(&ide_pci_device); - - pci_init(PCI_CONFIG_TYPE_2); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - /* Not: 00, 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F. */ - /* Yes: 01, 10, 11, 12, 13, 14. */ - pci_register_slot(0x01, PCI_CARD_NORMAL, 1, 3, 2, 4); - pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 4, 3, 3); - pci_register_slot(0x05, PCI_CARD_NORMAL, 1, 4, 3, 2); - pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 1, 3, 4); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i430lx_device); - device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); - device_add(&sio_zb_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&intel_flash_bxt_ami_device); - - return ret; -} - int machine_at_opti560l_init(const machine_t *model) { @@ -345,6 +277,94 @@ machine_at_valuepointp60_init(const machine_t *model) return ret; } +static const device_config_t batman_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "batman", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMBRA DP60 PCI", .internal_name = "ambradp60", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/batman/1004AF1P.BIO", "roms/machines/batman/1004AF1P.BI1", "" } }, + { .name = "Dell Dimension XPS P60", .internal_name = "dellxp60", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/batman/aptiva510_$IMAGES.USF", "" } }, + { .name = "Intel Premiere/PCI (Batman)", .internal_name = "batman", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/batman/1008AF1_.BIO", "roms/machines/batman/1008AF1_.BI1", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t batman_device = { + .name = "Intel Premiere/PCI (Batman)", + .internal_name = "batman_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = batman_config +}; + +int +machine_at_batman_init(const machine_t *model) +{ + int ret = 0; + const char* fn; + const char* fn2; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + int is_dell = !strcmp(device_get_config_bios("bios"), "dellxp60"); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + if (is_dell) + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + else { + fn2 = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 1); + ret = bios_load_linear_combined(fn, fn2, 0x1c000, 128); + } + device_context_restore(); + + machine_at_common_init_ex(model, 2); + + device_add(&amstrad_megapc_nvr_device); + device_add(&ide_pci_device); + + pci_init(PCI_CONFIG_TYPE_2); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); + if (is_dell) { + pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 4, 3, 3); + pci_register_slot(0x05, PCI_CARD_NORMAL, 1, 4, 3, 2); + pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 1, 3, 4); + } else { + pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); + } + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&sio_zb_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); + device_add(&intel_flash_bxt_ami_device); + + device_add(&i430lx_device); + + return ret; +} + void machine_at_premiere_common_init(const machine_t *model, int pci_switch) { diff --git a/src/machine/m_at_socket5.c b/src/machine/m_at_socket5.c index 6756dfe70..ebe565b6e 100644 --- a/src/machine/m_at_socket5.c +++ b/src/machine/m_at_socket5.c @@ -41,25 +41,6 @@ #include <86box/sound.h> /* i430NX */ -int -machine_at_ambradp90_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/ambradp90/1002AX1P.BIO", - "roms/machines/ambradp90/1002AX1P.BI1", - 0x1d000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE); - - device_add(&i430nx_device); - - return ret; -} - int machine_at_p54np4_init(const machine_t *model) { @@ -90,25 +71,6 @@ machine_at_p54np4_init(const machine_t *model) return ret; } -int -machine_at_dellplato_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/dellplato/1016AX1J.BIO", - "roms/machines/dellplato/1016AX1J.BI1", - 0x1d000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE); - - device_add(&i430nx_device); - - return ret; -} - int machine_at_586ip_init(const machine_t *model) { @@ -127,18 +89,61 @@ machine_at_586ip_init(const machine_t *model) return ret; } +static const device_config_t plato_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "plato", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMBRA DP90 PCI", .internal_name = "ambradp90", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/plato/1002AX1P.BIO", "roms/machines/plato/1002AX1P.BI1", "" } }, + { .name = "Dell Dimension XPS Pxxx", .internal_name = "dellplato", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/plato/1016AX1J.BIO", "roms/machines/plato/1016AX1J.BI1", "" } }, + { .name = "Intel Premiere/PCI II (Plato)", .internal_name = "plato", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/plato/1016ax1_.bio", "roms/machines/plato/1016ax1_.bi1", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t plato_device = { + .name = "Intel Premiere/PCI II (Plato)", + .internal_name = "plato_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = plato_config +}; + int machine_at_plato_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn; + const char* fn2; - ret = bios_load_linear_combined("roms/machines/plato/1016ax1_.bio", - "roms/machines/plato/1016ax1_.bi1", - 0x1d000, 128); - - 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); + fn2 = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 1); + ret = bios_load_linear_combined(fn, fn2, 0x1d000, 128); + device_context_restore(); + machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE); device_add(&i430nx_device); diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index d44758564..9614e2d1d 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -140,6 +140,46 @@ machine_at_p65up5_cp55t2d_init(const machine_t *model) return ret; } +static const device_config_t cu430hx_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "cu430hx", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "Intel CU430HX (Cumberland)", .internal_name = "cu430hx", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/cu430hx/1006DK0_.BIO", "roms/machines/cu430hx/1006DK0_.BI1", + "roms/machines/cu430hx/1006DK0_.BI2", "roms/machines/cu430hx/1006DK0_.BI3", + "roms/machines/cu430hx/1006DK0_.RCV", "" } }, + { .name = "Toshiba Equium 5200D", .internal_name = "equium5200", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/cu430hx/1003DK08.BIO", "roms/machines/cu430hx/1003DK08.BI1", + "roms/machines/cu430hx/1003DK08.BI2", "roms/machines/cu430hx/1003DK08.BI3", + "roms/machines/cu430hx/1003DK08.RCV", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t cu430hx_device = { + .name = "Intel CU430HX (Cumberland)", + .internal_name = "cu430hx_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = cu430hx_config +}; + static void machine_at_cu430hx_gpio_init(void) { @@ -171,9 +211,22 @@ machine_at_cu430hx_gpio_init(void) machine_set_gpio_default(gpio); } -static void -machine_at_cu430hx_common_init(const machine_t *model) +int +machine_at_cu430hx_init(const machine_t *model) { + int ret = 0; + const char* fn[5]; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + for (int i = 0; i < 5; i++) + fn[i] = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), i); + ret = bios_load_linear_combined2(fn[0], fn[1], fn[2], fn[3], fn[4], 0x3a000, 128); + device_context_restore(); + machine_at_common_init_ex(model, 2); machine_at_cu430hx_gpio_init(); @@ -194,28 +247,50 @@ machine_at_cu430hx_common_init(const machine_t *model) device_add(&piix3_device); device_add_params(&pc87306_device, (void *) PCX730X_AMI); device_add(&intel_flash_bxt_ami_device); -} - -int -machine_at_cu430hx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/cu430hx/1006DK0_.BIO", - "roms/machines/cu430hx/1006DK0_.BI1", - "roms/machines/cu430hx/1006DK0_.BI2", - "roms/machines/cu430hx/1006DK0_.BI3", - "roms/machines/cu430hx/1006DK0_.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_cu430hx_common_init(model); return ret; } +static const device_config_t tc430hx_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "tc430hx", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "Intel TC430HX (Tucson)", .internal_name = "tc430hx", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/tc430hx/1007DH0_.BIO", "roms/machines/tc430hx/1007DH0_.BI1", + "roms/machines/tc430hx/1007DH0_.BI2", "roms/machines/tc430hx/1007DH0_.BI3", + "roms/machines/tc430hx/1007DH0_.RCV", "" } }, + { .name = "Toshiba Infinia 7201", .internal_name = "infinia7200", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/tc430hx/1008DH08.BIO", "roms/machines/tc430hx/1008DH08.BI1", + "roms/machines/tc430hx/1008DH08.BI2", "roms/machines/tc430hx/1008DH08.BI3", + "roms/machines/tc430hx/1008DH08.RCV", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t tc430hx_device = { + .name = "Intel TC430HX (Tucson)", + .internal_name = "tc430hx_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = tc430hx_config +}; + static void machine_at_tc430hx_gpio_init(void) { @@ -247,18 +322,19 @@ machine_at_tc430hx_gpio_init(void) int machine_at_tc430hx_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn[5]; - ret = bios_load_linear_combined2("roms/machines/tc430hx/1007DH0_.BIO", - "roms/machines/tc430hx/1007DH0_.BI1", - "roms/machines/tc430hx/1007DH0_.BI2", - "roms/machines/tc430hx/1007DH0_.BI3", - "roms/machines/tc430hx/1007DH0_.RCV", - 0x3a000, 128); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; + device_context(model->device); + for (int i = 0; i < 5; i++) + fn[i] = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), i); + ret = bios_load_linear_combined2(fn[0], fn[1], fn[2], fn[3], fn[4], 0x3a000, 128); + device_context_restore(); + machine_at_common_init_ex(model, 2); machine_at_tc430hx_gpio_init(); @@ -407,64 +483,6 @@ machine_at_p55t2s_init(const machine_t *model) return ret; } -int -machine_at_equium5200_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/equium5200/1003DK08.BIO", - "roms/machines/equium5200/1003DK08.BI1", - "roms/machines/equium5200/1003DK08.BI2", - "roms/machines/equium5200/1003DK08.BI3", - "roms/machines/equium5200/1003DK08.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_cu430hx_common_init(model); - - return ret; -} - -int -machine_at_infinia7200_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/infinia7200/1008DH08.BIO", - "roms/machines/infinia7200/1008DH08.BI1", - "roms/machines/infinia7200/1008DH08.BI2", - "roms/machines/infinia7200/1008DH08.BI3", - "roms/machines/infinia7200/1008DH08.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - machine_at_tc430hx_gpio_init(); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&i430hx_device); - device_add(&piix3_device); - device_add_params(&pc87306_device, (void *) PCX730X_AMI); - device_add(&intel_flash_bxt_ami_device); - - return ret; -} - /* i430VX */ int machine_at_ap5vm_init(const machine_t *model) diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index 1166173f2..64d8a0fd5 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -42,9 +42,57 @@ #include <86box/sound.h> /* i430FX */ -static void -machine_at_p54tp4xe_common_init(const machine_t *model) +static const device_config_t p54tp4xe_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "p54tp4xe", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "Award BIOS v4.51PG", .internal_name = "p54tp4xe", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/p54tp4xe/t15i0302.awd", "" } }, + { .name = "MR BIOS V3.30", .internal_name = "p54tp4xe_mr", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/p54tp4xe/TRITON.BIO", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t p54tp4xe_device = { + .name = "ASUS P/I-P55TP4XE", + .internal_name = "p54tp4xe_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = p54tp4xe_config +}; + +int +machine_at_p54tp4xe_init(const machine_t *model) { + int ret = 0; + const char* fn; + + /* 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(model); pci_init(PCI_CONFIG_TYPE_1); @@ -59,36 +107,6 @@ machine_at_p54tp4xe_common_init(const machine_t *model) device_add(&piix_device); device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&intel_flash_bxt_device); -} - -int -machine_at_p54tp4xe_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p54tp4xe/t15i0302.awd", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_p54tp4xe_common_init(model); - - return ret; -} - -int -machine_at_p54tp4xe_mr_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p54tp4xe/TRITON.BIO", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_p54tp4xe_common_init(model); return ret; } @@ -122,6 +140,76 @@ machine_at_exp8551_init(const machine_t *model) return ret; } +int +machine_at_vectra54_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/vectra54/GT0724.22", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_VIDEO, 0, 0, 0, 0); + pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&s3_phoenix_trio64_onboard_pci_device); + + device_add(&i430fx_device); + device_add(&piix_device); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_NORMAL)); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +static const device_config_t thor_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "thor", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "Gateway 2000 (AMIBIOS)", .internal_name = "gw2katx", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/thor/1003CN0T.BIO", "roms/machines/thor/1003CN0T.BI1", "" } }, + { .name = "Intel (AMIBIOS)", .internal_name = "thor", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/thor/1006cn0_.bio", "roms/machines/thor/1006cn0_.bi1", "" } }, + { .name = "Intel (MR BIOS)", .internal_name = "mrthor", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/thor/mr_atx.bio", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t thor_device = { + .name = "Intel Advanced/ATX (Thor)", + .internal_name = "thor_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = thor_config +}; + static void machine_at_thor_gpio_init(void) { @@ -167,9 +255,29 @@ machine_at_thor_gpio_init(void) machine_set_gpio_default(gpio); } -static void -machine_at_thor_common_init(const machine_t *model, int has_video) +int +machine_at_thor_init(const machine_t *model) { + int ret = 0; + const char* fn; + const char* fn2; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + int is_mr = !strcmp(device_get_config_bios("bios"), "mrthor"); + int has_video = !strcmp(device_get_config_bios("bios"), "thor"); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + if (is_mr) + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + else { + fn2 = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 1); + ret = bios_load_linear_combined(fn, fn2, 0x20000, 128); + } + device_context_restore(); + machine_at_common_init_ex(model, 2); machine_at_thor_gpio_init(); @@ -189,86 +297,6 @@ machine_at_thor_common_init(const machine_t *model, int has_video) device_add(&piix_device); device_add_params(&pc87306_device, (void *) PCX730X_AMI); device_add(&intel_flash_bxt_ami_device); -} - -int -machine_at_gw2katx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/gw2katx/1003CN0T.BIO", - "roms/machines/gw2katx/1003CN0T.BI1", - 0x20000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_thor_common_init(model, 0); - - return ret; -} - -int -machine_at_vectra54_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/vectra54/GT0724.22", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_VIDEO, 0, 0, 0, 0); - pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); - - if (gfxcard[0] == VID_INTERNAL) - device_add(&s3_phoenix_trio64_onboard_pci_device); - - device_add(&i430fx_device); - device_add(&piix_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_NORMAL)); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_thor_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/thor/1006cn0_.bio", - "roms/machines/thor/1006cn0_.bi1", - 0x20000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_thor_common_init(model, 1); - - return ret; -} - -int -machine_at_mrthor_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/mrthor/mr_atx.bio", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_thor_common_init(model, 0); return ret; } diff --git a/src/machine/m_at_socket8.c b/src/machine/m_at_socket8.c index bcbf6ba18..df0f89196 100644 --- a/src/machine/m_at_socket8.c +++ b/src/machine/m_at_socket8.c @@ -253,78 +253,6 @@ machine_at_8600ttc_init(const machine_t *model) return ret; } -int -machine_at_dellvenus_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/dellvenus/1006CS1J.BIO", - "roms/machines/dellvenus/1006CS1J.BI1", - "roms/machines/dellvenus/1006CS1J.BI2", - "roms/machines/dellvenus/1006CS1J.BI3", - "roms/machines/dellvenus/1006CS1J.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i440fx_device); - device_add(&piix3_device); - device_add_params(&pc87307_device, (void *) (PCX730X_AMI | PCX7307_PC87307)); - - device_add(&intel_flash_bxt_ami_device); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(machine_get_snd_device(machine)); - - return ret; -} - -int -machine_at_gw2kvenus_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/gw2kvenus/1011CS1T.BIO", - "roms/machines/gw2kvenus/1011CS1T.BI1", - "roms/machines/gw2kvenus/1011CS1T.BI2", - "roms/machines/gw2kvenus/1011CS1T.BI3", - "roms/machines/gw2kvenus/1011CS1T.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i440fx_device); - device_add(&piix3_device); - device_add_params(&pc87307_device, (void *) (PCX730X_AMI | PCX7307_PC87307)); - - device_add(&intel_flash_bxt_ami_device); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(machine_get_snd_device(machine)); - - return ret; -} - int machine_at_686nx_init(const machine_t *model) { @@ -392,21 +320,66 @@ machine_at_ap440fx_init(const machine_t *model) return ret; } +static const device_config_t vs440fx_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "vs440fx", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "Dell Dimension XPS Pro___n", .internal_name = "dellvenus", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/vs440fx/1006CS1J.BIO", "roms/machines/vs440fx/1006CS1J.BI1", + "roms/machines/vs440fx/1006CS1J.BI2", "roms/machines/vs440fx/1006CS1J.BI3", + "roms/machines/vs440fx/1006CS1J.RCV", "" } }, + { .name = "Gateway 2000 Venus", .internal_name = "gw2kvenus", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/vs440fx/1011CS1T.BIO", "roms/machines/vs440fx/1011CS1T.BI1", + "roms/machines/vs440fx/1011CS1T.BI2", "roms/machines/vs440fx/1011CS1T.BI3", + "roms/machines/vs440fx/1011CS1T.RCV", "" } }, + { .name = "Intel VS440FX (Venus)", .internal_name = "vs440fx", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/vs440fx/1018CS1_.BIO", "roms/machines/vs440fx/1018CS1_.BI1", + "roms/machines/vs440fx/1018CS1_.BI2", "roms/machines/vs440fx/1018CS1_.BI3", + "roms/machines/vs440fx/1018CS1_.RCV", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t vs440fx_device = { + .name = "Intel TC430HX (Tucson)", + .internal_name = "vs440fx_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = vs440fx_config +}; + int machine_at_vs440fx_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn[5]; - ret = bios_load_linear_combined2("roms/machines/vs440fx/1018CS1_.BIO", - "roms/machines/vs440fx/1018CS1_.BI1", - "roms/machines/vs440fx/1018CS1_.BI2", - "roms/machines/vs440fx/1018CS1_.BI3", - "roms/machines/vs440fx/1018CS1_.RCV", - 0x3a000, 128); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; + device_context(model->device); + for (int i = 0; i < 5; i++) + fn[i] = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), i); + ret = bios_load_linear_combined2(fn[0], fn[1], fn[2], fn[3], fn[4], 0x3a000, 128); + device_context_restore(); + machine_at_common_init(model); pci_init(PCI_CONFIG_TYPE_1); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index e85f7768d..aacc69d59 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -3123,49 +3123,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* AMI BIOS for a chipset-less machine, most likely has AMI 'F' KBC firmware. */ - { - .name = "[ISA] AMI IBM AT", - .internal_name = "ibmatami", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_ibmatami_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 512, - .step = 256 - }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000004f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Uses Commodore (CBM) KBC firmware, to be implemented as identical to the IBM AT KBC firmware unless evidence emerges of any proprietary commands. */ { @@ -3476,11 +3433,11 @@ const machine_t machines[] = { }, /* Has IBM AT KBC firmware. */ { - .name = "[ISA] Phoenix IBM AT", + .name = "[ISA] Phoenix AT clone", .internal_name = "ibmatpx", .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_ibmatpx_init, + .init = machine_at_pxat_init, .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -3520,11 +3477,11 @@ const machine_t machines[] = { }, /* Has Quadtel KBC firmware. */ { - .name = "[ISA] Quadtel IBM AT", + .name = "[ISA] Quadtel AT clone", .internal_name = "ibmatquadtel", .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_ibmatquadtel_init, + .init = machine_at_quadtat_init, .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -3784,6 +3741,49 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* AMI BIOS for a chipset-less machine, most likely has AMI 'F' KBC firmware. */ + { + .name = "[ISA] Trangg Bow Unknown 286", + .internal_name = "ibmatami", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_tbunk286_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 512, + .step = 256 + }, + .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00003800, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* No proper pictures of the KBC exist, though it seems to have the IBM AT KBC firmware. */ { @@ -5237,51 +5237,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has a JetKey KBC without version, which is a clone of AMI '8'. */ - { - .name = "[ALi M1217] Chaintech 325AX (MR BIOS)", - .internal_name = "mr1217", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_ALI_M1217, - .init = machine_at_mr1217_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386SX, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_AMI | 0x00003800, - .kbc_p1 = 0x000004f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &c325ax_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -6187,7 +6143,7 @@ const machine_t machines[] = { /* 386DX machines */ /* Uses Compaq KBC firmware. */ { - .name = "[ISA] Compaq Deskpro 386 (September 1986)", + .name = "[ISA] Compaq Deskpro 386", .internal_name = "deskpro386", .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_DISCRETE, @@ -6221,51 +6177,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000000f4, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Uses Compaq KBC firmware. */ - { - .name = "[ISA] Compaq Deskpro 386 (May 1988)", - .internal_name = "deskpro386_05_1988", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_deskpro386_05_1988_init, - .p1_handler = machine_compaq_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX_DESKPRO386, - .block = CPU_BLOCK(CPU_486DLC, CPU_RAPIDCAD), - .min_bus = 16000000, - .max_bus = 25000000, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_COMPAQ, - .kbc_p1 = 0x000000f4, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &deskpro386_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -7063,52 +6975,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has AMIKey 'F' or MR BIOS 'M' KBC firmware - (it's just the MR BIOS for the above machine). */ - { - .name = "[OPTi 495SX] DataExpert SX495 (MR BIOS)", - .internal_name = "mr495", - .type = MACHINE_TYPE_386DX_486, - .chipset = MACHINE_CHIPSET_OPTI_495SX, - .init = machine_at_opti495_mr_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX | CPU_PKG_SOCKET1, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 32768, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_AMI | 0x00004d00, - .kbc_p1 = 0x000004f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &opti495_ami_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -7742,6 +7609,50 @@ const machine_t machines[] = { .net_device = NULL }, /* Has a VLSI VL82C113A SCAMP Combination I/O which holds the KBC. */ + { + .name = "[VLSI 82C486] Olivetti PCS 44/C", + .internal_name = "pcs44c", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_VLSI_VL82C486, + .init = machine_at_pcs44c_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET1, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 1024, + .max = 20480, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &oti077_pcs44c_device, + .snd_device = NULL, + .net_device = NULL + }, + /* Has a VLSI VL82C113A SCAMP Combination I/O which holds the KBC. */ { .name = "[VLSI 82C486] Tulip 486 DC/DT", .internal_name = "tuliptc38", @@ -8710,95 +8621,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This is Version 2.0 - it has a VIA VT82C42N KBC. */ - { - .name = "[OPTi 895] Jetway J-403TG Rev D", - .internal_name = "403tg_d", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_403tg_d_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_VIA | 0x00424600, - .kbc_p1 = 0x000004f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has JetKey 5 KBC Firmware which looks like it is a clone of AMIKey type F. */ - { - .name = "[OPTi 895] Jetway J-403TG Rev D (MR BIOS)", - .internal_name = "403tg_d_mr", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_403tg_d_mr_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_VIA | 0x00424600, - .kbc_p1 = 0x000004f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &j403tg_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -9571,50 +9394,6 @@ const machine_t machines[] = { .net_device = NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { - .name = "[OPTi 802G] IBM Aptiva 510/710/Vision", - .internal_name = "aptiva510", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_aptiva510_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3_PC330, - .block = CPU_BLOCK_NONE, - .min_bus = 25000000, - .max_bus = 33333333, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 2.0, - .max_multi = 3.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = 0x00000000, - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &gd5430_onboard_vlb_device, - .snd_device = NULL, - .net_device = NULL - }, - /* Has IBM PS/2 Type 1 KBC firmware. */ { .name = "[OPTi 802G] IBM PC 330 (type 6573)", .internal_name = "pc330_6573", @@ -9650,7 +9429,7 @@ const machine_t machines[] = { .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &pc330_6573_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -11354,52 +11133,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* This has the Phoenix MultiKey KBC firmware. - This is basically an Intel Batman (*NOT* Batman's Revenge) with a fancier - POST screen */ - { - .name = "[i430LX] AMBRA DP60 PCI", - .internal_name = "ambradp60", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_ambradp60_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET4, - .block = CPU_BLOCK_NONE, - .min_bus = 60000000, - .max_bus = 66666667, - .min_voltage = 5000, - .max_voltage = 5000, - .min_multi = MACHINE_MULTIPLIER_FIXED, - .max_multi = MACHINE_MULTIPLIER_FIXED - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00012900, - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Has AMIKey H KBC firmware (AMIKey-2), per POST screen with BIOS string shown in the manual. Has PS/2 mouse support with serial-style (DB9) connector. @@ -11493,50 +11226,6 @@ const machine_t machines[] = { .net_device = NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { - .name = "[i430LX] Dell Dimension XPS P60", - .internal_name = "dellxp60", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_dellxp60_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET4, - .block = CPU_BLOCK_NONE, - .min_bus = 60000000, - .max_bus = 66666667, - .min_voltage = 5000, - .max_voltage = 5000, - .min_multi = MACHINE_MULTIPLIER_FIXED, - .max_multi = MACHINE_MULTIPLIER_FIXED - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00012900, - .kbc_p1 = 0x00001010, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has IBM PS/2 Type 1 KBC firmware. */ { .name = "[i430LX] Dell OptiPlex 560/L", .internal_name = "opti560l", @@ -11669,6 +11358,50 @@ const machine_t machines[] = { .net_device = NULL }, /* This has the Phoenix MultiKey KBC firmware. */ + { + .name = "[i430LX] Intel Premiere/PCI (Batman)", + .internal_name = "batman", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_batman_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET4, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, + .min_voltage = 5000, + .max_voltage = 5000, + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &batman_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has the Phoenix MultiKey KBC firmware. */ { .name = "[i430LX] Intel Premiere/PCI (Batman's Revenge)", .internal_name = "revenge", @@ -12122,51 +11855,6 @@ const machine_t machines[] = { /* Socket 5 machines */ /* 430NX */ - /* This has the Phoenix MultiKey KBC firmware. - This is basically an Intel Premiere/PCI II with a fancier POST screen. */ - { - .name = "[i430NX] AMBRA DP90 PCI", - .internal_name = "ambradp90", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_ambradp90_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00012900, - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Has AMI 'H' KBC firmware. */ { .name = "[i430NX] ASUS PCI/I-P54NP4", @@ -12211,50 +11899,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Same as Intel Premiere PCI/II, but with a Dell OEM BIOS */ - { - .name = "[i430NX] Dell Dimension XPS Pxxx", - .internal_name = "dellplato", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_dellplato_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3520, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00012900, - .kbc_p1 = 0x00001010, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Has AMI 'H' KBC firmware. */ { .name = "[i430NX] Gigabyte GA-586IP", @@ -12335,7 +11979,7 @@ const machine_t machines[] = { .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &plato_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -13187,51 +12831,7 @@ const machine_t machines[] = { .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { - .name = "[i430FX] ASUS P/I-P55TP4XE (MR BIOS)", - .internal_name = "p54tp4xe_mr", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_p54tp4xe_mr_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK_NONE, - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3600, - .min_multi = 1.5, - .max_multi = 3.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, - .step = 8192 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_AMI | 0x00004800, - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &p54tp4xe_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -13283,52 +12883,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the - PC87306 Super I/O chip, command 0xA1 returns '5'. - Command 0xA0 copyright string: (C)1994 AMI . */ - { - .name = "[i430FX] Gateway 2000 Thor", - .internal_name = "gw2katx", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_gw2katx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, /* Machine has optional onboard sound: Crystal CS4232-KQ */ - .ram = { - .min = 8192, - .max = 131072, - .step = 8192 - }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Has a SM(S)C FDC37C932 Super I/O chip with on-chip KBC with AMI MegaKey (revision '5') KBC firmware. */ { @@ -13412,7 +12966,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &thor_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -13420,52 +12974,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the - PC87306 Super I/O chip, command 0xA1 returns '5'. - Command 0xA0 copyright string: (C)1994 AMI . */ - { - .name = "[i430FX] Intel Advanced/ATX (Thor) (MR BIOS)", - .internal_name = "mrthor", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_mrthor_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK_NONE, - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, /* Machine has optional onboard video: S3 Trio64V+ and optional onboard sound: Crystal CS4232-KQ */ - .ram = { - .min = 8192, - .max = 131072, - .step = 8192 - }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ @@ -14313,7 +13821,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &cu430hx_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -14360,7 +13868,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &tc430hx_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -14550,96 +14058,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ - { - .name = "[i430HX] Toshiba Equium 5200D", - .internal_name = "equium5200", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_equium5200_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 2800, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_USB, /* Machine has internal video: ATI Mach64GT 3D Rage and internal NIC: Intel 82557 */ - .ram = { - .min = 8192, - .max = 524288, - .step = 4096 - }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &sb_vibra16c_onboard_device, - .net_device = NULL - }, - /* OEM version of Intel TC430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ - { - .name = "[i430HX] Toshiba Infinia 7201", - .internal_name = "infinia7200", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_infinia7200_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 2800, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal sound: Yamaha YMF701-S */ - .ram = { - .min = 8192, - .max = 524288, - .step = 4096 - }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &s3_virge_375_pci_device, - .snd_device = NULL, - .net_device = NULL - }, /* 430VX */ /* This has the VIA VT82C42N or Holtek HT6542B KBC. */ @@ -17222,94 +16640,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* It's an Intel VS440FX with a Dell OEM BIOS */ - { - .name = "[i440FX] Dell Dimension XPS Pro___n", - .internal_name = "dellvenus", - .type = MACHINE_TYPE_SOCKET8, - .chipset = MACHINE_CHIPSET_INTEL_440FX, - .init = machine_at_dellvenus_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET8, - .block = CPU_BLOCK_NONE, - .min_bus = 60000000, - .max_bus = 66666667, - .min_voltage = 2100, - .max_voltage = 3500, - .min_multi = 2.0, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, - .step = 8192 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &cs4236_onboard_device, - .net_device = NULL - }, - /* It's an Intel VS440FX with a Gateway 2000 OEM BIOS */ - { - .name = "[i440FX] Gateway 2000 Venus", - .internal_name = "gw2kvenus", - .type = MACHINE_TYPE_SOCKET8, - .chipset = MACHINE_CHIPSET_INTEL_440FX, - .init = machine_at_gw2kvenus_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET8, - .block = CPU_BLOCK_NONE, - .min_bus = 60000000, - .max_bus = 66666667, - .min_voltage = 2100, - .max_voltage = 3500, - .min_multi = 2.0, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, - .step = 8192 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &cs4236_onboard_device, - .net_device = NULL - }, /* Has the AMIKey-2 ('H') KBC firmware. */ { .name = "[i440FX] Gigabyte GA-686NX", @@ -17438,7 +16768,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &vs440fx_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, diff --git a/src/video/vid_oak_oti.c b/src/video/vid_oak_oti.c index 3ea935b06..4ea0b21e4 100644 --- a/src/video/vid_oak_oti.c +++ b/src/video/vid_oak_oti.c @@ -38,6 +38,7 @@ #define BIOS_067_M300_15_PATH "roms/machines/m30015/EVC_BIOS.ROM" #define BIOS_077_PATH "roms/video/oti/oti077.vbi" #define BIOS_077_ACER100T_PATH "roms/machines/acer100t/oti077_acer100t.BIN" +#define BIOS_077_PCS44C_PATH "roms/machines/pcs44c/V032004G.25" enum { OTI_037C = 0, @@ -46,7 +47,8 @@ enum { OTI_067_AMA932J = 3, OTI_067_M300 = 4, OTI_077 = 5, - OTI_077_ACER100T = 6 + OTI_077_ACER100T = 6, + OTI_077_PCS44C = 7 }; typedef struct { @@ -104,7 +106,8 @@ oti_out(uint16_t addr, uint8_t val, void *priv) case 0x3c7: case 0x3c8: case 0x3c9: - if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T)) + if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T) || + (oti->chip_id == OTI_077_PCS44C)) sc1148x_ramdac_out(addr, 0, val, svga->ramdac, svga); else svga_out(addr, val, svga); @@ -166,7 +169,8 @@ oti_out(uint16_t addr, uint8_t val, void *priv) mem_mapping_disable(&svga->mapping); else mem_mapping_enable(&svga->mapping); - } else if (oti->chip_id == OTI_077 || oti->chip_id == OTI_077_ACER100T) { + } else if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T) || + (oti->chip_id == OTI_077_PCS44C)) { svga->vram_display_mask = (val & 0x0c) ? oti->vram_mask : 0x3ffff; switch ((val & 0xc0) >> 6) { @@ -251,7 +255,8 @@ oti_in(uint16_t addr, void *priv) case 0x3c7: case 0x3c8: case 0x3c9: - if (oti->chip_id == OTI_077 || oti->chip_id == OTI_077_ACER100T) + if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T) || + (oti->chip_id == OTI_077_PCS44C)) temp = sc1148x_ramdac_in(addr, 0, svga->ramdac, svga); else temp = svga_in(addr, svga); @@ -324,7 +329,9 @@ oti_in(uint16_t addr, void *priv) case 0x3de: temp = oti->index; - if (oti->chip_id) + if (oti->chip_id > 5) + temp |= (5 << 5); + else if (oti->chip_id) temp |= (oti->chip_id << 5); break; @@ -495,6 +502,12 @@ oti_init(const device_t *info) oti->pos = 0x08; /* Tell the BIOS the I/O ports are already enabled to avoid a double I/O handler mess. */ io_sethandler(0x46e8, 1, oti_pos_in, NULL, NULL, oti_pos_out, NULL, NULL, oti); break; + case OTI_077_PCS44C: + romfn = BIOS_077_PCS44C_PATH; + oti->vram_size = device_get_config_int("memory"); + oti->pos = 0x08; /* Tell the BIOS the I/O ports are already enabled to avoid a double I/O handler mess. */ + io_sethandler(0x46e8, 1, oti_pos_in, NULL, NULL, oti_pos_out, NULL, NULL, oti); + break; default: break; @@ -513,12 +526,13 @@ oti_init(const device_t *info) */ video_inform(0x1, &timing_oti); } else - video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_oti); + video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_oti); svga_init(info, &oti->svga, oti, oti->vram_size << 10, oti_recalctimings, oti_in, oti_out, NULL, NULL); - if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T)) + if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T) || + (oti->chip_id == OTI_077_PCS44C)) oti->svga.ramdac = device_add(&sc11487_ramdac_device); /*Actually a 82c487, probably a clone.*/ io_sethandler(0x03c0, 32, @@ -574,6 +588,12 @@ oti077_acer100t_available(void) return (rom_present(BIOS_077_ACER100T_PATH)); } +static int +oti077_pcs44c_available(void) +{ + return (rom_present(BIOS_077_PCS44C_PATH)); +} + static int oti067_077_available(void) { @@ -766,3 +786,16 @@ const device_t oti077_acer100t_device = { .force_redraw = oti_force_redraw, .config = oti077_acer100t_config }; +const device_t oti077_pcs44c_device = { + .name = "Oak OTI-077 (Olivetti PCS 44/C)", + .internal_name = "oti077_pcs44c", + .flags = DEVICE_ISA, + .local = 7, + .init = oti_init, + .close = oti_close, + .reset = NULL, + .available = oti077_pcs44c_available, + .speed_changed = oti_speed_changed, + .force_redraw = oti_force_redraw, + .config = oti077_acer100t_config +};