From eaf7032e63021aa60b667a99f9ed65fc1f42e3a4 Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 30 Nov 2021 17:05:06 +0100 Subject: [PATCH] Added another Olivetti workaround to the AT keyboard controller code (the rewrite that works just fine even on the Olivetti M240 without any hacks, can't come soon enough!), fixes #1861. --- src/device/keyboard_at.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/device/keyboard_at.c b/src/device/keyboard_at.c index f7cddcdf4..0b9e85eab 100644 --- a/src/device/keyboard_at.c +++ b/src/device/keyboard_at.c @@ -679,17 +679,21 @@ add_to_kbc_queue_front(atkbd_t *dev, uint8_t val, uint8_t channel, uint8_t stat_ if (channel == 2) { if (dev->mem[0] & 0x02) picint(0x1000); - dev->last_irq = 0x1000; + if (kbc_ven != KBC_VEN_OLIVETTI) + dev->last_irq = 0x1000; } else { if (dev->mem[0] & 0x01) picint(2); - dev->last_irq = 2; + if (kbc_ven != KBC_VEN_OLIVETTI) + dev->last_irq = 2; } dev->out = val; if (channel == 2) dev->status = (dev->status & ~STAT_IFULL) | (STAT_OFULL | STAT_MFULL) | stat_hi; else dev->status = (dev->status & ~(STAT_IFULL | STAT_MFULL)) | STAT_OFULL | stat_hi; + if (kbc_ven == KBC_VEN_OLIVETTI) + dev->last_irq = 0x0000; }