Fix the initialization and general purpose I/O (GPIO) pins for the OptiPlex GXL/GXM

This commit is contained in:
rushieda
2025-05-19 20:59:08 +03:00
parent d7282ddc46
commit 9f46d0b9d8
2 changed files with 13 additions and 3 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

@@ -248,7 +248,8 @@ machine_at_optiplex_gxl_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
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);
@@ -263,7 +264,7 @@ machine_at_optiplex_gxl_init(const machine_t *model)
if (sound_card_current[0] == SOUND_INTERNAL)
machine_snd = device_add(machine_get_snd_device(machine));
device_add(&keyboard_ps2_ami_pci_device);
device_add(&keyboard_ps2_phoenix_pci_device);
device_add(&i430fx_device);
device_add(&piix_device);
device_add(&pc87332_device);