On ASIC keyboard controllers, output on channel 0 (KBC) now overrides any existing bytes in the output buffer, fixes FIC PT-2000 soft reset problems.

This commit is contained in:
OBattler
2024-07-21 04:53:54 +02:00
parent dfe83ac32a
commit 2e6d392ff8
2 changed files with 10 additions and 1 deletions

View File

@@ -422,6 +422,14 @@ kbc_delay_to_ob(atkbc_t *dev, uint8_t val, uint8_t channel, uint8_t stat_hi)
dev->stat_hi = stat_hi;
dev->pending = 1;
dev->state = STATE_KBC_DELAY_OUT;
if (dev->is_asic && (channel == 0) && (dev->status & STAT_OFULL)) {
/* Expedite the sending to the output buffer to prevent the wrong
data from being accidentally read. */
kbc_send_to_ob(dev, dev->val, dev->channel, dev->stat_hi);
dev->state = STATE_MAIN_IBF;
dev->pending = 0;
}
}
static void kbc_at_process_cmd(void *priv);

View File

@@ -345,7 +345,8 @@ machine_at_pt2000_init(const machine_t *model)
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
device_add(&keyboard_ps2_ami_pci_device);
/* Should be VIA, but we do not emulate that yet. */
device_add(&keyboard_ps2_holtek_device);
device_add(&i430fx_device);
device_add(&piix_device);
device_add(&pc87332_398_device);