Merge remote-tracking branch 'origin/master' into version/4.1

This commit is contained in:
OBattler
2023-10-10 00:23:30 +02:00
36 changed files with 1153 additions and 400 deletions

View File

@@ -177,6 +177,39 @@ machine_at_apollo_init(const machine_t *model)
return ret;
}
static void
machine_at_zappa_gpio_init(void)
{
uint32_t gpio = 0xffffe6ff;
/* Register 0x0079: */
/* Bit 7: 0 = Clear password, 1 = Keep password. */
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
/* Bit 4: External CPU clock (Switch 8). */
/* Bit 3: External CPU clock (Switch 7). */
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
/* Bit 2: No Connect. */
/* Bit 1: No Connect. */
/* Bit 0: 2x multiplier, 1 = 1.5x multiplier (Switch 6). */
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
if (cpu_busspeed <= 50000000)
gpio |= 0xffff10ff;
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
gpio |= 0xffff18ff;
else if (cpu_busspeed > 60000000)
gpio |= 0xffff00ff;
if (cpu_dmulti <= 1.5)
gpio |= 0xffff01ff;
else
gpio |= 0xffff00ff;
machine_set_gpio_default(gpio);
}
int
machine_at_zappa_init(const machine_t *model)
{
@@ -190,6 +223,7 @@ machine_at_zappa_init(const machine_t *model)
return ret;
machine_at_common_init_ex(model, 2);
machine_at_zappa_gpio_init();
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);

View File

@@ -171,6 +171,42 @@ machine_at_m7shi_init(const machine_t *model)
return ret;
}
/* The Sony VAIO is an AG430HX, I'm assuming it has the same configuration bits
as the TC430HX, hence the #define. */
#define machine_at_ag430hx_gpio_init machine_at_tc430hx_gpio_init
/* The PB680 is a NV430VX, I'm assuming it has the same configuration bits as
the TC430HX, hence the #define. */
#define machine_at_nv430vx_gpio_init machine_at_tc430hx_gpio_init
static void
machine_at_tc430hx_gpio_init(void)
{
uint32_t gpio = 0xffffe1ff;
/* Register 0x0079: */
/* Bit 7: 0 = Clear password, 1 = Keep password. */
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
/* Bit 4: External CPU clock (Switch 8). */
/* Bit 3: External CPU clock (Switch 7). */
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
/* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */
/* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */
/* Bit 0: 0 = Reserved. */
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
if (cpu_busspeed <= 50000000)
gpio |= 0xffff10ff;
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
gpio |= 0xffff18ff;
else if (cpu_busspeed > 60000000)
gpio |= 0xffff00ff;
machine_set_gpio_default(gpio);
}
int
machine_at_tc430hx_init(const machine_t *model)
{
@@ -187,6 +223,7 @@ machine_at_tc430hx_init(const machine_t *model)
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);
@@ -196,7 +233,10 @@ machine_at_tc430hx_init(const machine_t *model)
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);
device_add(&s3_virge_375_pci_device);
if (gfxcard[0] == VID_INTERNAL)
device_add(machine_get_vid_device(machine));
device_add(&i430hx_device);
device_add(&piix3_device);
device_add(&keyboard_ps2_ami_pci_device);
@@ -222,6 +262,7 @@ machine_at_infinia7200_init(const machine_t *model)
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);
@@ -231,7 +272,10 @@ machine_at_infinia7200_init(const machine_t *model)
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);
device_add(&s3_virge_375_pci_device);
if (gfxcard[0] == VID_INTERNAL)
device_add(machine_get_vid_device(machine));
device_add(&i430hx_device);
device_add(&piix3_device);
device_add(&keyboard_ps2_ami_pci_device);
@@ -241,7 +285,83 @@ machine_at_infinia7200_init(const machine_t *model)
return ret;
}
/* Information about that machine on machine.h */
static void
machine_at_cu430hx_gpio_init(void)
{
uint32_t gpio = 0xffffe1ff;
/* Register 0x0079: */
/* Bit 7: 0 = Clear password, 1 = Keep password. */
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
/* Bit 4: External CPU clock (Switch 8). */
/* Bit 3: External CPU clock (Switch 7). */
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
/* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */
/* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */
/* Bit 0: 0 = Reserved. */
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
if (cpu_busspeed <= 50000000)
gpio |= 0xffff10ff;
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
gpio |= 0xffff18ff;
else if (cpu_busspeed > 60000000)
gpio |= 0xffff00ff;
if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)->available())
gpio |= 0xffff04ff;
machine_set_gpio_default(gpio);
}
static void
machine_at_cu430hx_common_init(const machine_t *model)
{
machine_at_common_init_ex(model, 2);
machine_at_cu430hx_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); // ATI VGA Graphics
pci_register_slot(0x0C, PCI_CARD_NETWORK, 4, 0, 0, 0); // Intel 82557 Ethernet Network
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 0, 0, 0); // riser
if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)->available())
machine_snd = device_add(machine_get_snd_device(machine));
device_add(&i430hx_device);
device_add(&piix3_device);
device_add(&keyboard_ps2_ami_pci_device);
device_add(&pc87306_device);
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;
}
int
machine_at_equium5200_init(const machine_t *model)
{
@@ -257,21 +377,7 @@ machine_at_equium5200_init(const machine_t *model)
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(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0);
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 0, 0, 0); // riser
device_add(&i430hx_device);
device_add(&piix3_device);
device_add(&keyboard_ps2_ami_pci_device);
device_add(&pc87306_device);
device_add(&intel_flash_bxt_ami_device);
machine_at_cu430hx_common_init(model);
return ret;
}
@@ -292,6 +398,7 @@ machine_at_pcv90_init(const machine_t *model)
return ret;
machine_at_common_init_ex(model, 2);
machine_at_ag430hx_gpio_init();
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
@@ -548,6 +655,7 @@ machine_at_pb680_init(const machine_t *model)
return ret;
machine_at_common_init_ex(model, 2);
machine_at_nv430vx_gpio_init();
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
@@ -556,6 +664,10 @@ machine_at_pb680_init(const machine_t *model)
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
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(&i430vx_device);
device_add(&piix3_device);
device_add(&keyboard_ps2_ami_pci_device);

View File

@@ -41,11 +41,41 @@
#include <86box/fdc.h>
#include <86box/nvr.h>
#include <86box/plat_unused.h>
#include <86box/sound.h>
static void
machine_at_thor_common_init(const machine_t *model, UNUSED(int mr))
machine_at_thor_gpio_init(void)
{
uint32_t gpio = 0xffffe1ff;
/* Register 0x0079: */
/* Bit 7: 0 = Clear password, 1 = Keep password. */
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
/* Bit 4: External CPU clock (Switch 8). */
/* Bit 3: External CPU clock (Switch 7). */
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
/* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */
/* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */
/* Bit 0: 0 = Reserved. */
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
if (cpu_busspeed <= 50000000)
gpio |= 0xffff10ff;
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
gpio |= 0xffff18ff;
else if (cpu_busspeed > 60000000)
gpio |= 0xffff00ff;
machine_set_gpio_default(gpio);
}
static void
machine_at_thor_common_init(const machine_t *model, int has_video)
{
machine_at_common_init_ex(model, 2);
machine_at_thor_gpio_init();
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
@@ -56,8 +86,8 @@ machine_at_thor_common_init(const machine_t *model, UNUSED(int mr))
pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 3, 2, 1);
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
if (gfxcard[0] == VID_INTERNAL)
device_add(&s3_phoenix_trio64vplus_onboard_pci_device);
if (has_video && (gfxcard[0] == VID_INTERNAL))
device_add(machine_get_vid_device(machine));
device_add(&keyboard_ps2_intel_ami_pci_device);
device_add(&i430fx_device);
@@ -175,7 +205,7 @@ machine_at_thor_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_thor_common_init(model, 0);
machine_at_thor_common_init(model, 1);
return ret;
}
@@ -191,7 +221,93 @@ machine_at_mrthor_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_thor_common_init(model, 1);
machine_at_thor_common_init(model, 0);
return ret;
}
static void
machine_at_endeavor_gpio_init(void)
{
uint32_t gpio = 0xffffe0cf;
uint16_t addr;
/* Register 0x0078: */
/* Bit 5,4: Vibra 16S base address: 0 = 220h, 1 = 260h, 2 = 240h, 3 = 280h. */
device_context(machine_get_snd_device(machine));
addr = device_get_config_hex16("base");
switch (addr) {
case 0x0220:
gpio |= 0xffff00cf;
break;
case 0x0240:
gpio |= 0xffff00ef;
break;
case 0x0260:
gpio |= 0xffff00df;
break;
case 0x0280:
gpio |= 0xffff00ff;
break;
}
device_context_restore();
/* Register 0x0079: */
/* Bit 7: 0 = Clear password, 1 = Keep password. */
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
/* Bit 4: External CPU clock (Switch 8). */
/* Bit 3: External CPU clock (Switch 7). */
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
/* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */
/* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */
/* Bit 0: 0 = 2x multiplier, 1 = 1.5x multiplier (Switch 6). */
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
if (cpu_busspeed <= 50000000)
gpio |= 0xffff10cf;
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
gpio |= 0xffff18cf;
else if (cpu_busspeed > 60000000)
gpio |= 0xffff00cf;
if (sound_card_current[0] == SOUND_INTERNAL)
gpio |= 0xffff04cf;
if (cpu_dmulti <= 1.5)
gpio |= 0xffff01cf;
else
gpio |= 0xffff00cf;
machine_set_gpio_default(gpio);
}
uint32_t
machine_at_endeavor_gpio_handler(uint8_t write, uint32_t val)
{
uint32_t ret = machine_get_gpio_default();
if (write) {
ret &= ((val & 0xffffffcf) | 0xffff0000);
ret |= (val & 0x00000030);
if (machine_snd != NULL) switch ((val >> 4) & 0x03) {
case 0x00:
sb_vibra16s_onboard_relocate_base(0x0220, machine_snd);
break;
case 0x01:
sb_vibra16s_onboard_relocate_base(0x0260, machine_snd);
break;
case 0x02:
sb_vibra16s_onboard_relocate_base(0x0240, machine_snd);
break;
case 0x03:
sb_vibra16s_onboard_relocate_base(0x0280, machine_snd);
break;
}
machine_set_gpio(ret);
} else
ret = machine_get_gpio();
return ret;
}
@@ -209,6 +325,7 @@ machine_at_endeavor_init(const machine_t *model)
return ret;
machine_at_common_init_ex(model, 2);
machine_at_endeavor_gpio_init();
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
@@ -220,7 +337,10 @@ machine_at_endeavor_init(const machine_t *model)
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
if (gfxcard[0] == VID_INTERNAL)
device_add(&s3_phoenix_trio64_onboard_pci_device);
device_add(machine_get_vid_device(machine));
if (sound_card_current[0] == SOUND_INTERNAL)
machine_snd = device_add(machine_get_snd_device(machine));
device_add(&keyboard_ps2_intel_ami_pci_device);
device_add(&i430fx_device);
@@ -260,6 +380,41 @@ machine_at_ms5119_init(const machine_t *model)
return ret;
}
static void
machine_at_pb640_gpio_init(void)
{
uint32_t gpio = 0xffffffff;
/* Register 0x0079: */
/* Bit 7: 0 = Clear password, 1 = Keep password. */
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
/* Bit 4: External CPU clock (Switch 8). */
/* Bit 3: External CPU clock (Switch 7). */
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
/* Bit 2: No Connect. */
/* Bit 1: No Connect. */
/* Bit 0: 2x multiplier, 1 = 1.5x multiplier (Switch 6). */
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
gpio = 0xffffe6ff;
if (cpu_busspeed <= 50000000)
gpio |= 0xffff10ff;
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
gpio |= 0xffff18ff;
else if (cpu_busspeed > 60000000)
gpio |= 0xffff00ff;
if (cpu_dmulti <= 1.5)
gpio |= 0xffff01ff;
else
gpio |= 0xffff00ff;
machine_set_gpio_default(gpio);
}
int
machine_at_pb640_init(const machine_t *model)
{
@@ -272,6 +427,7 @@ machine_at_pb640_init(const machine_t *model)
return ret;
machine_at_common_init_ex(model, 2);
machine_at_pb640_gpio_init();
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);

View File

@@ -72,7 +72,15 @@ machine_init_ex(int m)
if (!bios_only) {
machine_log("Initializing as \"%s\"\n", machine_getname());
machine_init_p1();
machine_init_gpio();
machine_init_gpio_acpi();
machine_snd = NULL;
is_vpc = 0;
standalone_gameport_type = NULL;
gameport_instance_id = 0;

View File

@@ -9110,7 +9110,7 @@ const machine_t machines[] = {
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &s3_phoenix_trio64vplus_onboard_pci_device,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
},
@@ -9124,7 +9124,7 @@ const machine_t machines[] = {
.chipset = MACHINE_CHIPSET_INTEL_430FX,
.init = machine_at_endeavor_init,
.p1_handler = NULL,
.gpio_handler = NULL,
.gpio_handler = machine_at_endeavor_gpio_handler,
.available_flag = MACHINE_AVAILABLE,
.gpio_acpi_handler = NULL,
.cpu = {
@@ -9138,7 +9138,7 @@ const machine_t machines[] = {
.max_multi = 3.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM | MACHINE_ACPI,
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI,
.ram = {
.min = 8192,
.max = 131072,
@@ -9153,7 +9153,7 @@ const machine_t machines[] = {
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &s3_phoenix_trio64_onboard_pci_device,
.snd_device = NULL,
.snd_device = &sb_vibra16s_onboard_device,
.net_device = NULL
},
/* This has an AMIKey-2, which is an updated version of type 'H'. */
@@ -9809,12 +9809,11 @@ const machine_t machines[] = {
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.vid_device = &s3_virge_375_pci_device,
.snd_device = NULL,
.net_device = NULL
},
/* OEM version of Intel TC430HX, has AMI MegaKey KBC firmware on the PC87306
Super I/O chip */
/* OEM version of Intel TC430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */
{
.name = "[i430HX] Toshiba Infinia 7200",
.internal_name = "infinia7200",
@@ -9850,13 +9849,51 @@ const machine_t machines[] = {
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.vid_device = &s3_virge_375_pci_device,
.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 . */
/* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */
{
.name = "[i430HX] Intel CU430HX",
.internal_name = "cu430hx",
.type = MACHINE_TYPE_SOCKET7,
.chipset = MACHINE_CHIPSET_INTEL_430HX,
.init = machine_at_cu430hx_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 = 50000000,
.max_bus = 66666667,
.min_voltage = 2800,
.max_voltage = 3520,
.min_multi = 1.5,
.max_multi = 3.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI,
.ram = {
.min = 8192,
.max = 196608,
.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 = &sb_vibra16c_onboard_device,
.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",
@@ -9878,7 +9915,7 @@ const machine_t machines[] = {
.max_multi = 3.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI,
.flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI,
.ram = {
.min = 8192,
.max = 196608,
@@ -9893,7 +9930,7 @@ const machine_t machines[] = {
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.snd_device = NULL,
.snd_device = &sb_vibra16c_onboard_device,
.net_device = NULL
},
/* According to tests from real hardware: This has AMI MegaKey KBC firmware on the
@@ -10327,7 +10364,7 @@ const machine_t machines[] = {
.max_multi = 3.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI,
.flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI,
.ram = {
.min = 8192,
.max = 131072,
@@ -10341,7 +10378,7 @@ const machine_t machines[] = {
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.vid_device = &s3_phoenix_trio64vplus_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
},
@@ -13380,11 +13417,23 @@ const machine_t machines[] = {
/* Saved copies - jumpers get applied to these.
We use also machine_gpio to store IBM PC/XT jumpers as they need more than one byte. */
static uint8_t machine_p1_default;
static uint8_t machine_p1;
static uint32_t machine_gpio_default;
static uint32_t machine_gpio;
static uint32_t machine_gpio_acpi_default;
static uint32_t machine_gpio_acpi;
void *machine_snd = NULL;
uint8_t
machine_get_p1_default(void)
{
return machine_p1_default;
}
uint8_t
machine_get_p1(void)
{
@@ -13392,11 +13441,22 @@ machine_get_p1(void)
}
void
machine_set_p1(uint8_t val)
machine_set_p1_default(uint8_t val)
{
machine_p1 = machines[machine].kbc_p1 & val;
machine_p1 = machine_p1_default = val;
}
void
machine_set_p1(uint8_t val)
{
machine_p1 = val;
}
void
machine_and_p1(uint8_t val)
{
machine_p1 = machine_p1_default & val;
}
uint8_t
machine_handle_p1(uint8_t write, uint8_t val)
@@ -13407,7 +13467,7 @@ machine_handle_p1(uint8_t write, uint8_t val)
ret = machines[machine].p1_handler(write, val);
else {
if (write)
machine_p1 = machines[machine].kbc_p1 & val;
machine_p1 = machine_p1_default & val;
else
ret = machine_p1;
}
@@ -13418,7 +13478,13 @@ machine_handle_p1(uint8_t write, uint8_t val)
void
machine_init_p1(void)
{
machine_p1 = machines[machine].kbc_p1;
machine_p1 = machine_p1_default = machines[machine].kbc_p1;
}
uint32_t
machine_get_gpio_default(void)
{
return machine_gpio_default;
}
uint32_t
@@ -13427,10 +13493,22 @@ machine_get_gpio(void)
return machine_gpio;
}
void
machine_set_gpio_default(uint32_t val)
{
machine_gpio = machine_gpio_default = val;
}
void
machine_set_gpio(uint32_t val)
{
machine_gpio = machines[machine].gpio & val;
machine_gpio = val;
}
void
machine_and_gpio(uint32_t val)
{
machine_gpio = machine_gpio_default & val;
}
uint32_t
@@ -13442,7 +13520,7 @@ machine_handle_gpio(uint8_t write, uint32_t val)
ret = machines[machine].gpio_handler(write, val);
else {
if (write)
machine_gpio = machines[machine].gpio & val;
machine_gpio = machine_gpio_default & val;
else
ret = machine_gpio;
}
@@ -13453,7 +13531,13 @@ machine_handle_gpio(uint8_t write, uint32_t val)
void
machine_init_gpio(void)
{
machine_gpio = machines[machine].gpio;
machine_gpio = machine_gpio_default = machines[machine].gpio;
}
uint32_t
machine_get_gpio_acpi_default(void)
{
return machine_gpio_acpi_default;
}
uint32_t
@@ -13462,10 +13546,22 @@ machine_get_gpio_acpi(void)
return machine_gpio_acpi;
}
void
machine_set_gpio_acpi_default(uint32_t val)
{
machine_gpio_acpi = machine_gpio_acpi_default = val;
}
void
machine_set_gpio_acpi(uint32_t val)
{
machine_gpio_acpi = machines[machine].gpio_acpi & val;
machine_gpio_acpi = val;
}
void
machine_and_gpio_acpi(uint32_t val)
{
machine_gpio_acpi = machine_gpio_acpi_default & val;
}
uint32_t
@@ -13477,7 +13573,7 @@ machine_handle_gpio_acpi(uint8_t write, uint32_t val)
ret = machines[machine].gpio_acpi_handler(write, val);
else {
if (write)
machine_gpio_acpi = machines[machine].gpio_acpi & val;
machine_gpio_acpi = machine_gpio_acpi_default & val;
else
ret = machine_gpio_acpi;
}
@@ -13488,7 +13584,7 @@ machine_handle_gpio_acpi(uint8_t write, uint32_t val)
void
machine_init_gpio_acpi(void)
{
machine_gpio_acpi = machines[machine].gpio_acpi;
machine_gpio_acpi = machine_gpio_acpi_default = machines[machine].gpio_acpi;
}
int