Merge pull request #5598 from rushieda/optiplex_gxl

Add the Dell OptiPlex GXL/GXM (430FX/Socket 5)
This commit is contained in:
Miran Grča
2025-05-19 20:06:41 +02:00
committed by GitHub
4 changed files with 88 additions and 1 deletions

View File

@@ -1096,7 +1096,16 @@ write64_generic(void *priv, uint8_t val)
- Bit 5: Manufacturing jumper (must be set);
*/
uint8_t p1 = 0x24;
kbc_delay_to_ob(dev, p1, 0, 0x01);
kbc_delay_to_ob(dev, p1, 0, 0x00);
} else if (!strcmp(machine_get_internal_name(), "optiplex_gxl")) {
/*
Dell OptiPlex GXL/GXM:
- Bit 3: Password disable jumper (must be clear);
- Bit 4: Keyboard fuse (must be set);
- Bit 5: Manufacturing jumper (must be set);
*/
uint8_t p1 = 0x30;
kbc_delay_to_ob(dev, p1, 0, 0x00);
} else {
/* (B0 or F0) | (0x08 or 0x0c) */
uint8_t p1_out = ((dev->p1 | fixed_bits) & 0xf0) |

View File

@@ -672,6 +672,7 @@ extern int machine_at_tek932_init(const machine_t *);
extern int machine_at_acerv30_init(const machine_t *);
extern int machine_at_apollo_init(const machine_t *);
extern int machine_at_optiplex_gxl_init(const machine_t *);
extern int machine_at_zappa_init(const machine_t *);
extern int machine_at_powermatev_init(const machine_t *);
extern int machine_at_hawk_init(const machine_t *);

View File

@@ -40,6 +40,7 @@
#include <86box/sio.h>
#include <86box/video.h>
#include <86box/machine.h>
#include <86box/sound.h>
int
machine_at_plato_init(const machine_t *model)
@@ -236,6 +237,42 @@ machine_at_apollo_init(const machine_t *model)
return ret;
}
int
machine_at_optiplex_gxl_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/optiplex_gxl/DELL.ROM",
0x000e0000, 131072, 0);
if (bios_only || !ret)
return ret;
machine_at_common_init_ex(model, 2);
device_add(&amstrad_megapc_nvr_device);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 1, 2, 3, 4);
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 2, 1);
pci_register_slot(0x10, PCI_CARD_VIDEO, 0, 0, 0, 0);
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
if (gfxcard[0] == VID_INTERNAL)
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_phoenix_pci_device);
device_add(&i430fx_device);
device_add(&piix_device);
device_add(&pc87332_device);
device_add(&intel_flash_bxt_device);
return ret;
}
static void
machine_at_zappa_gpio_init(void)
{

View File

@@ -10553,6 +10553,46 @@ const machine_t machines[] = {
.snd_device = NULL,
.net_device = NULL
},
/* Has a National Semiconductor PC87332VLJ Super I/O with AMIKey 'F' KBC firmware. */
{
.name = "[i430FX] Dell OptiPlex GXL/GXM",
.internal_name = "optiplex_gxl",
.type = MACHINE_TYPE_SOCKET5,
.chipset = MACHINE_CHIPSET_INTEL_430FX,
.init = machine_at_optiplex_gxl_init,
.p1_handler = NULL,
.gpio_handler = NULL,
.available_flag = MACHINE_AVAILABLE,
.gpio_acpi_handler = NULL,
.cpu = {
.package = CPU_PKG_SOCKET5_7,
.block = CPU_BLOCK(CPU_Cx6x86),
.min_bus = 60000000,
.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_SOUND | MACHINE_APM, /* Video: S3 Trio64V+ (86C765), Sound: Creative ViBRA 16S (CT2504), Network: 3Com ETHERLINK III (3C509B) */
.ram = {
.min = 8192,
.max = 131072,
.step = 8192
},
.nvrmask = 127,
.kbc_device = NULL,
.kbc_p1 = 0xff,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &s3_phoenix_trio64vplus_onboard_pci_device,
.snd_device = &sb_vibra16s_onboard_device,
.net_device = NULL /* not yet emulated */
},
/* 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 . */