From ca2492e893423f171982e769d97f8bdf88fee34b Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 13:18:31 +0100 Subject: [PATCH 1/7] Added the Trident TVGA 8900 D-R. --- src/include/86box/video.h | 1 + src/video/vid_table.c | 1 + src/video/vid_tvga.c | 26 +++++++++++++++++++++++++- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/include/86box/video.h b/src/include/86box/video.h index 65d96a4b6..e56498807 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -550,6 +550,7 @@ extern const device_t ibm_ps1_2121_device; /* Trident TVGA 8900 */ extern const device_t tvga8900b_device; extern const device_t tvga8900d_device; +extern const device_t tvga8900dr_device; extern const device_t tvga9000b_device; extern const device_t nec_sv9000_device; diff --git a/src/video/vid_table.c b/src/video/vid_table.c index 5b9c3f8f3..9992eff45 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -144,6 +144,7 @@ video_cards[] = { { &sigma_device }, { &tvga8900b_device }, { &tvga8900d_device }, + { &tvga8900dr_device }, { &tvga9000b_device }, { &nec_sv9000_device }, { &et4000k_isa_device }, diff --git a/src/video/vid_tvga.c b/src/video/vid_tvga.c index 591851016..babd909be 100644 --- a/src/video/vid_tvga.c +++ b/src/video/vid_tvga.c @@ -37,6 +37,7 @@ #define ROM_TVGA_8900B "roms/video/tvga/tvga8900b.vbi" #define ROM_TVGA_8900CLD "roms/video/tvga/trident.bin" +#define ROM_TVGA_8900DR "roms/video/tvga/8900DR.VBI" #define ROM_TVGA_9000B "roms/video/tvga/tvga9000b.bin" #define ROM_TVGA_9000B_NEC_SV9000 "roms/video/tvga/SV9000.VBI" @@ -428,7 +429,10 @@ tvga_init(const device_t *info) bios_fn = ROM_TVGA_8900B; break; case TVGA8900CLD_ID: - bios_fn = ROM_TVGA_8900CLD; + if (info->local & 0x0100) + bios_fn = ROM_TVGA_8900DR; + else + bios_fn = ROM_TVGA_8900CLD; break; case TVGA9000B_ID: bios_fn = (info->local & 0x100) ? ROM_TVGA_9000B_NEC_SV9000 : ROM_TVGA_9000B; @@ -466,6 +470,12 @@ tvga8900d_available(void) return rom_present(ROM_TVGA_8900CLD); } +static int +tvga8900dr_available(void) +{ + return rom_present(ROM_TVGA_8900DR); +} + static int tvga9000b_available(void) { @@ -564,6 +574,20 @@ const device_t tvga8900d_device = { .config = tvga_config }; +const device_t tvga8900dr_device = { + .name = "Trident TVGA 8900D-R", + .internal_name = "tvga8900dr", + .flags = DEVICE_ISA, + .local = TVGA8900CLD_ID | 0x0100, + .init = tvga_init, + .close = tvga_close, + .reset = NULL, + { .available = tvga8900dr_available }, + .speed_changed = tvga_speed_changed, + .force_redraw = tvga_force_redraw, + .config = tvga_config +}; + const device_t tvga9000b_device = { .name = "Trident TVGA 9000B", .internal_name = "tvga9000b", From 3061e9343c768272860ad3a9810aae3dc686df60 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 13:30:13 +0100 Subject: [PATCH 2/7] Give the TVGA 8900D-R faster timings. --- src/video/vid_tvga.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video/vid_tvga.c b/src/video/vid_tvga.c index babd909be..e97805beb 100644 --- a/src/video/vid_tvga.c +++ b/src/video/vid_tvga.c @@ -418,7 +418,10 @@ tvga_init(const device_t *info) video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga9000); tvga->vram_size = 512 << 10; } else { - video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga8900); + if (info->local & 0x0100) + video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga9000); + else + video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga8900); tvga->vram_size = device_get_config_int("memory") << 10; } From cb8b6b68a749496b44fbf488cf7d4ae5ce1935cb Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 13:31:42 +0100 Subject: [PATCH 3/7] And made them on par with the Tseng ET4000AX, as the available data suggests. --- src/video/vid_tvga.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video/vid_tvga.c b/src/video/vid_tvga.c index e97805beb..cd5714d04 100644 --- a/src/video/vid_tvga.c +++ b/src/video/vid_tvga.c @@ -60,6 +60,7 @@ typedef struct tvga_t { } tvga_t; video_timings_t timing_tvga8900 = { .type = VIDEO_ISA, .write_b = 3, .write_w = 3, .write_l = 6, .read_b = 8, .read_w = 8, .read_l = 12 }; +video_timings_t timing_tvga8900dr = { .type = VIDEO_ISA, .write_b = 3, .write_w = 3, .write_l = 6, .read_b = 5, .read_w = 5, .read_l = 10 }; video_timings_t timing_tvga9000 = { .type = VIDEO_ISA, .write_b = 7, .write_w = 7, .write_l = 12, .read_b = 7, .read_w = 7, .read_l = 12 }; static uint8_t crtc_mask[0x40] = { @@ -419,7 +420,7 @@ tvga_init(const device_t *info) tvga->vram_size = 512 << 10; } else { if (info->local & 0x0100) - video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga9000); + video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga8900dr); else video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga8900); tvga->vram_size = device_get_config_int("memory") << 10; From 567d66b788355e903fba2a3f9c780ce5da5f0e55 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 13:43:59 +0100 Subject: [PATCH 4/7] Added the IBM Aptiva CM (Japanese PC 330). --- src/include/86box/machine.h | 1 + src/machine/m_at_386dx_486.c | 44 +++++++++++++++++++++++++++--------- src/machine/machine_table.c | 40 ++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 11 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index e27a70d79..765279257 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -521,6 +521,7 @@ extern int machine_at_403tg_d_init(const machine_t *); extern int machine_at_403tg_d_mr_init(const machine_t *); extern int machine_at_pb450_init(const machine_t *); extern int machine_at_pb450_init(const machine_t *); +extern int machine_at_aptiva_cm_init(const machine_t *); extern int machine_at_pc330_6573_init(const machine_t *); extern int machine_at_mvi486_init(const machine_t *); diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 1dd63ce32..7d843aece 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -693,17 +693,9 @@ machine_at_pb450_init(const machine_t *model) return ret; } -int -machine_at_pc330_6573_init(const machine_t *model) /* doesn't like every CPU other than the iDX4 and the Intel OverDrive, hangs without a PS/2 mouse */ +static void +machine_at_pc330_6573_common_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_common_init_ex(model, 2); device_add(&ide_vlb_2ch_device); @@ -718,7 +710,7 @@ machine_at_pc330_6573_init(const machine_t *model) /* doesn't like every CPU oth pci_register_slot(0x0E, PCI_CARD_VIDEO, 13, 14, 15, 16); if (gfxcard[0] == VID_INTERNAL) - device_add(&gd5430_onboard_vlb_device); + device_add(machine_get_vid_device(machine)); device_add(&opti602_device); device_add(&opti802g_device); @@ -727,6 +719,36 @@ machine_at_pc330_6573_init(const machine_t *model) /* doesn't like every CPU oth device_add(&fdc37c665_ide_device); device_add(&ide_opti611_vlb_device); device_add(&intel_flash_bxt_device); +} + +int +machine_at_aptiva_cm_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/aptiva_cm/$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; } diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index d620357d6..1426dbcb3 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -7185,6 +7185,46 @@ const machine_t machines[] = { .net_device = NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ + { + .name = "[OPTi 802G] IBM Aptiva CM", + .internal_name = "aptiva_cm", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_OPTI_895_802G, + .init = machine_at_aptiva_cm_init, + .p1_handler = NULL, + .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, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &gd5430_onboard_pci_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", From 9006f31f45de2c40d8d73b009a23b1d73e656b32 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 14:46:33 +0100 Subject: [PATCH 5/7] Added the NEC Mate NX MA23C. --- src/include/86box/machine.h | 1 + src/machine/m_at_socket7.c | 31 ++++++++++++++++++++++++++ src/machine/machine_table.c | 43 ++++++++++++++++++++++++++++++++++++- 3 files changed, 74 insertions(+), 1 deletion(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 765279257..c13b423b0 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -706,6 +706,7 @@ extern int machine_at_pb810_init(const machine_t *); extern int machine_at_mb520n_init(const machine_t *); extern int machine_at_i430vx_init(const machine_t *); +extern int machine_at_ma23c_init(const machine_t *); extern int machine_at_nupro592_init(const machine_t *); extern int machine_at_tx97_init(const machine_t *); #if defined(DEV_BRANCH) && defined(USE_AN430TX) diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index 9ab24b7c2..ce21c6437 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -798,6 +798,37 @@ machine_at_i430vx_init(const machine_t *model) return ret; } +int +machine_at_ma23c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ma23c/BIOS.ROM", + 0x000c0000, 262144, 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(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_VIDEO, 3, 4, 1, 2); + device_add(&i430tx_device); + device_add(&piix4_device); + device_add(&nec_mate_unk_device); + device_add(&keyboard_ps2_ami_pci_device); + device_add(&fdc37c67x_device); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + return ret; +} + int machine_at_nupro592_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 1426dbcb3..810597899 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -11997,6 +11997,47 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* Has a SM(S)C FDC37C67x Super I/O chip with on-chip KBC with Phoenix or + AMIKey-2 KBC firmware. */ + { + .name = "[i430TX] NEC Mate NX MA23C", + .internal_name = "ma23c", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_ma23c_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, + .min_voltage = 2700, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, + .step = 8192 + }, + .nvrmask = 255, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* The BIOS sends KBC command BB and expects it to output a byte, which is AMI KBC behavior. A picture shows a VIA VT82C42N KBC though, so it could be a case of that KBC with AMI firmware. */ { @@ -13683,7 +13724,7 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has a SM(S)C FDC37M60x Super I/O chip with on-chip KBC with Phoenix or + /* Has a SM(S)C FDC37C67x Super I/O chip with on-chip KBC with Phoenix or AMIKey-2 KBC firmware. */ { .name = "[i440LX] NEC Mate NX MA30D/23D", From d4fa99648e9a0f6adbcb943a85312df4bb074cf8 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 18:56:42 +0100 Subject: [PATCH 6/7] SiS 5595 fixes, added the PC Chips M747, and corrected the name of the Aptiva. --- src/acpi.c | 3 +++ src/chipset/sis_5513_p2i.c | 32 +++++++++++++++++++++++-- src/include/86box/machine.h | 3 ++- src/machine/m_at_386dx_486.c | 4 ++-- src/machine/m_at_slot1.c | 27 +++++++++++++++++++++ src/machine/machine_table.c | 46 +++++++++++++++++++++++++++++++++--- 6 files changed, 107 insertions(+), 8 deletions(-) diff --git a/src/acpi.c b/src/acpi.c index 93cb71542..339ea7dcf 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -1733,6 +1733,9 @@ acpi_reg_write_sis_5595(int size, uint16_t addr, uint8_t val, void *priv) break; case 0x1c: dev->regs.gpe_pin = ((dev->regs.gpe_pin & ~(0xff << shift32)) | ((val & 0xff) << shift32)); + if (!strcmp(machine_get_internal_name(), "m747") && (val & 0x10) && + !(dev->regs.gpe_io & 0x00000010)) + resetx86(); break; case 0x1d: dev->regs.gpe_pin = ((dev->regs.gpe_pin & ~(0x0f << shift32)) | ((val & 0x0f) << shift32)); diff --git a/src/chipset/sis_5513_p2i.c b/src/chipset/sis_5513_p2i.c index df18cc4b3..d0c423a8e 100644 --- a/src/chipset/sis_5513_p2i.c +++ b/src/chipset/sis_5513_p2i.c @@ -86,6 +86,7 @@ typedef struct sis_5513_pci_to_isa_t { port_92_t *port_92; void *pit; nvr_t *nvr; + char *fn; ddma_t *ddma; acpi_t *acpi; void *smbus; @@ -1077,7 +1078,6 @@ sis_5513_11_pci_to_isa_reset(sis_5513_pci_to_isa_t *dev) dev->sis->ide_bits_1_3_writable = 0; dev->sis->usb_enabled = 0; - sis_5513_apc_reset(dev); sis_5513_apc_recalc(dev, 0); } @@ -1132,7 +1132,6 @@ sis_5513_b0_pci_to_isa_reset(sis_5513_pci_to_isa_t *dev) dev->sis->usb_enabled = 0; - sis_5513_apc_reset(dev); sis_5513_apc_recalc(dev, 0); if (dev->rev == 0x81) @@ -1196,6 +1195,17 @@ static void sis_5513_pci_to_isa_close(void *priv) { sis_5513_pci_to_isa_t *dev = (sis_5513_pci_to_isa_t *) priv; + FILE *fp = NULL; + + fp = nvr_fopen(dev->fn, "wb"); + + if (fp != NULL) { + (void) fwrite(dev->apc_regs, 256, 1, fp); + fclose(fp); + } + + if (dev->fn != NULL) + free(dev->fn); free(dev); } @@ -1205,6 +1215,8 @@ sis_5513_pci_to_isa_init(UNUSED(const device_t *info)) { sis_5513_pci_to_isa_t *dev = (sis_5513_pci_to_isa_t *) calloc(1, sizeof(sis_5513_pci_to_isa_t)); uint8_t pit_is_fast = (((pit_mode == -1) && is486) || (pit_mode == 1)); + FILE *fp = NULL; + int c; dev->rev = info->local; @@ -1272,6 +1284,22 @@ sis_5513_pci_to_isa_init(UNUSED(const device_t *info)) dev->sis->acpi->priv = dev->sis; acpi_set_slot(dev->sis->acpi, dev->sis->sb_pci_slot); acpi_set_nvr(dev->sis->acpi, dev->nvr); + + /* Set up the NVR file's name. */ + c = strlen(machine_get_internal_name()) + 9; + dev->fn = (char *) malloc(c + 1); + sprintf(dev->fn, "%s_apc.nvr", machine_get_internal_name()); + + fp = nvr_fopen(dev->fn, "rb"); + + memset(dev->apc_regs, 0x00, sizeof(dev->apc_regs)); + sis_5513_apc_reset(dev); + if (fp != NULL) { + if (fread(dev->apc_regs, 1, 256, fp) != 256) + fatal("sis_5513_pci_to_isa_init(): Error reading APC data\n"); + fclose(fp); + } + acpi_set_irq_mode(dev->sis->acpi, 2); break; } diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index c13b423b0..18abf9ea9 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -521,7 +521,7 @@ extern int machine_at_403tg_d_init(const machine_t *); extern int machine_at_403tg_d_mr_init(const machine_t *); extern int machine_at_pb450_init(const machine_t *); extern int machine_at_pb450_init(const machine_t *); -extern int machine_at_aptiva_cm_init(const machine_t *); +extern int machine_at_aptiva_510_init(const machine_t *); extern int machine_at_pc330_6573_init(const machine_t *); extern int machine_at_mvi486_init(const machine_t *); @@ -801,6 +801,7 @@ extern int machine_at_borapro_init(const machine_t *); extern int machine_at_ms6168_init(const machine_t *); extern int machine_at_p6f99_init(const machine_t *); +extern int machine_at_m747_init(const machine_t *); /* m_at_slot2.c */ extern int machine_at_6gxu_init(const machine_t *); diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 7d843aece..4cfa7447e 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -722,11 +722,11 @@ machine_at_pc330_6573_common_init(const machine_t *model) } int -machine_at_aptiva_cm_init(const machine_t *model) +machine_at_aptiva_510_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/aptiva_cm/$IMAGES.USF", + ret = bios_load_linear("roms/machines/aptiva_510/$IMAGES.USF", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index d31d763d4..a3c25d12b 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -841,3 +841,30 @@ machine_at_p6f99_init(const machine_t *model) return ret; } +int +machine_at_m747_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/m747/990521.rom", + 0x000c0000, 262144, 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(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 0, 0, 0, 0); + device_add(&sis_5600_device); + device_add(&keyboard_ps2_ami_pci_device); + device_add(&it8661f_device); + device_add(&winbond_flash_w29c020_device); + + return ret; +} diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 810597899..04cc59043 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -7186,11 +7186,11 @@ const machine_t machines[] = { }, /* Has IBM PS/2 Type 1 KBC firmware. */ { - .name = "[OPTi 802G] IBM Aptiva CM", - .internal_name = "aptiva_cm", + .name = "[OPTi 802G] IBM Aptiva 510/710/Vision", + .internal_name = "aptiva_510", .type = MACHINE_TYPE_486_S3, .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_aptiva_cm_init, + .init = machine_at_aptiva_510_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -14513,6 +14513,46 @@ const machine_t machines[] = { .snd_device = &es1371_onboard_device, /* ES1373 but we currently don't emulate that. */ .net_device = NULL }, + /* Has the SiS (5)600 chipset with on-chip KBC. */ + { + .name = "[SiS 5600] PC Chips M747", + .internal_name = "m747", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_SIS_5600, + .init = machine_at_m747_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 100000000, + .min_voltage = 1300, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 8.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1572864, + .step = 1024 + }, + .nvrmask = 255, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Slot 1/2 machines */ /* 440GX */ From f4a7fd7190122f121ea00cfe2dbed2d04d969d41 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 19:07:54 +0100 Subject: [PATCH 7/7] Added two more ET4000AX BIOS'es. --- src/video/vid_et4000.c | 82 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 71 insertions(+), 11 deletions(-) diff --git a/src/video/vid_et4000.c b/src/video/vid_et4000.c index 5fe524fd8..7ceacb823 100644 --- a/src/video/vid_et4000.c +++ b/src/video/vid_et4000.c @@ -63,7 +63,9 @@ #define ET4000_TYPE_KASAN 5 /* Kasan ET4000 */ #define BIOS_ROM_PATH "roms/video/et4000/ET4000.BIN" +#define V8_06_BIOS_ROM_PATH "roms/video/et4000/ET4000_V8_06.BIN" #define TC6058AF_BIOS_ROM_PATH "roms/video/et4000/Tseng_Labs_VGA-4000_BIOS_V1.1.bin" +#define V1_21_BIOS_ROM_PATH "roms/video/et4000/Tseng_Labs_VGA-4000_BIOS_V1.21.bin" #define KOREAN_BIOS_ROM_PATH "roms/video/et4000/tgkorvga.bin" #define KOREAN_FONT_ROM_PATH "roms/video/et4000/tg_ksc5601.rom" #define KASAN_BIOS_ROM_PATH "roms/video/et4000/et4000_kasan16.bin" @@ -783,6 +785,7 @@ et4000_mca_feedb(UNUSED(void *priv)) static void * et4000_init(const device_t *info) { + const char *bios_ver = NULL; const char *fn; et4000_t *dev; int i; @@ -803,8 +806,8 @@ et4000_init(const device_t *info) NULL, NULL); io_sethandler(0x03c0, 32, et4000_in, NULL, NULL, et4000_out, NULL, NULL, dev); - if (dev->type == ET4000_TYPE_TC6058AF) - fn = TC6058AF_BIOS_ROM_PATH; + bios_ver = (char *) device_get_config_bios("bios_ver"); + fn = (char *) device_get_bios_file(info, bios_ver, 0); break; case ET4000_TYPE_MCA: /* MCA ET4000AX */ @@ -925,12 +928,6 @@ et4000_force_redraw(void *priv) dev->svga.fullchange = changeframecount; } -static int -et4000_tc6058af_available(void) -{ - return rom_present(TC6058AF_BIOS_ROM_PATH); -} - static int et4000_available(void) { @@ -970,12 +967,75 @@ static const device_config_t et4000_tc6058af_config[] = { } } }, + { + .name = "bios_ver", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "v1_10", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, /*W1*/ + .bios = { + { .name = "Version 1.10", .internal_name = "v1_10", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 32768, .files = { TC6058AF_BIOS_ROM_PATH, "" } }, + { .name = "Version 1.21", .internal_name = "v1_21", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 32768, .files = { V1_21_BIOS_ROM_PATH, "" } }, + { .files_no = 0 } + }, + }, { .type = CONFIG_END } // clang-format on }; +static const device_config_t et4000_bios_config[] = { + // clang-format off + { + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 1024, + .selection = { + { + .description = "256 KB", + .value = 256 + }, + { + .description = "512 KB", + .value = 512 + }, + { + .description = "1 MB", + .value = 1024 + }, + { + .description = "" + } + } + }, + { + .name = "bios_ver", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "v8_01", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, /*W1*/ + .bios = { + { .name = "Version 8.01", .internal_name = "v8_01", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 32768, .files = { BIOS_ROM_PATH, "" } }, + { .name = "Version 8.06", .internal_name = "v8_06", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 32768, .files = { V8_06_BIOS_ROM_PATH, "" } }, + { .files_no = 0 } + }, + }, + { + .type = CONFIG_END + } + // clang-format on +}; + static const device_config_t et4000_config[] = { // clang-format off { @@ -1015,7 +1075,7 @@ const device_t et4000_tc6058af_isa_device = { .init = et4000_init, .close = et4000_close, .reset = NULL, - { .available = et4000_tc6058af_available }, + { .available = NULL }, .speed_changed = et4000_speed_changed, .force_redraw = et4000_force_redraw, .config = et4000_tc6058af_config @@ -1029,10 +1089,10 @@ const device_t et4000_isa_device = { .init = et4000_init, .close = et4000_close, .reset = NULL, - { .available = et4000_available }, + { .available = NULL }, .speed_changed = et4000_speed_changed, .force_redraw = et4000_force_redraw, - .config = et4000_config + .config = et4000_bios_config }; const device_t et4000_mca_device = {