Merge branch 'master' into TC1995

This commit is contained in:
TC1995
2025-10-19 21:03:29 +02:00
4 changed files with 236 additions and 1 deletions

View File

@@ -970,6 +970,11 @@ extern const device_t p54tp4xe_device;
#endif
extern int machine_at_p54tp4xe_init(const machine_t *);
extern int machine_at_exp8551_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t hpvectravexxx_device;
#endif
extern int machine_at_hpvectravexxx_init(const machine_t *);
extern int machine_at_vectra500mt_init(const machine_t *);
extern int machine_at_vectra54_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t thor_device;

View File

@@ -157,6 +157,150 @@ machine_at_exp8551_init(const machine_t *model)
return ret;
}
static void
machine_at_hpvectravexxx_gpio_init(void)
{
uint32_t gpio = 0x40;
if (cpu_busspeed <= 40000000)
gpio |= 0x30;
else if ((cpu_busspeed > 40000000) && (cpu_busspeed <= 50000000))
gpio |= 0x00;
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
gpio |= 0x20;
else if (cpu_busspeed > 60000000)
gpio |= 0x10;
if (cpu_dmulti <= 1.5)
gpio |= 0x82;
else if ((cpu_dmulti > 1.5) && (cpu_dmulti <= 2.0))
gpio |= 0x02;
else if ((cpu_dmulti > 2.0) && (cpu_dmulti <= 2.5))
gpio |= 0x00;
else if (cpu_dmulti > 2.5)
gpio |= 0x80;
machine_set_gpio_default(gpio);
}
static const device_config_t hpvectravexxx_config[] = {
// clang-format off
{
.name = "bios",
.description = "BIOS Version",
.type = CONFIG_BIOS,
.default_string = "gu_07_05",
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = {
{
.name = "GU.07.02 (01/25/96)",
.internal_name = "gu_07_02",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 131072,
.files = { "roms/machines/hpvectravexxx/d3653.bin", "" }
},
{
.name = "GU.07.05 (08/06/96)",
.internal_name = "gu_07_05",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 131072,
.files = { "roms/machines/hpvectravexxx/GU0705US.FUL", "" }
},
{ .files_no = 0 }
}
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
const device_t hpvectravexxx_device = {
.name = "HP Vectra VE 5/XXX Series 2",
.internal_name = "hpvectravexxx_device",
.flags = 0,
.local = 0,
.init = NULL,
.close = NULL,
.reset = NULL,
.available = NULL,
.speed_changed = NULL,
.force_redraw = NULL,
.config = hpvectravexxx_config
};
int
machine_at_hpvectravexxx_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);
machine_at_hpvectravexxx_gpio_init();
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);
device_add(&i430fx_device);
device_add(&piix_device);
device_add_params(&pc87306_device, (void *) PCX730X_PHOENIX_42);
device_add(&intel_flash_bxt_device);
if (gfxcard[0] == VID_INTERNAL)
device_add(machine_get_vid_device(machine));
return ret;
}
int
machine_at_vectra500mt_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/vectra500mt/GJ0718.FUL",
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(machine_get_vid_device(machine));
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_vectra54_init(const machine_t *model)
{

View File

@@ -13333,6 +13333,92 @@ const machine_t machines[] = {
.snd_device = NULL,
.net_device = NULL
},
{
.name = "[i430FX] HP Vectra VE 5/XXX Series 2",
.internal_name = "hpvectravexxx",
.type = MACHINE_TYPE_SOCKET7_3V,
.chipset = MACHINE_CHIPSET_INTEL_430FX,
.init = machine_at_hpvectravexxx_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_VIDEO | MACHINE_APM,
.ram = {
.min = 8192,
.max = 131072,
.step = 8192
},
.nvrmask = 255,
.jumpered_ecp_dma = 0,
.default_jumpered_ecp_dma = -1,
.kbc_device = NULL,
.kbc_params = 0x00000000,
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = &hpvectravexxx_device,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &gd5436_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
},
{
.name = "[i430FX] HP Vectra 500 Series xxx/MT",
.internal_name = "vectra500mt",
.type = MACHINE_TYPE_SOCKET7_3V,
.chipset = MACHINE_CHIPSET_INTEL_430FX,
.init = machine_at_vectra500mt_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_VIDEO | MACHINE_APM,
.ram = {
.min = 8192,
.max = 131072,
.step = 8192
},
.nvrmask = 511,
.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 = &s3_phoenix_trio64_onboard_pci_device,
.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. */
{

View File

@@ -1812,7 +1812,7 @@ fdc37c93x_reset(void *priv)
memset(dev->gpio_pulldn, 0xff, 8);
/* Acer V62X requires bit 0 to be clear to not be stuck in "clear password" mode. */
if (machines[machine].init == machine_at_vectra54_init) {
if ((machines[machine].init == machine_at_vectra54_init) || (machines[machine].init == machine_at_vectra500mt_init)) {
dev->gpio_pulldn[1] = 0x40;
/*