From 6cb88c27bd21286c08176a51b0a2f62cec489201 Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 14 Nov 2019 06:14:48 +0100 Subject: [PATCH] Fixed the readback of the PC/XT FPU installed switch. --- src/keyboard_xt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/keyboard_xt.c b/src/keyboard_xt.c index 3bd7c6c8e..554b35b56 100644 --- a/src/keyboard_xt.c +++ b/src/keyboard_xt.c @@ -8,7 +8,7 @@ * * Implementation of the XT-style keyboard. * - * Version: @(#)keyboard_xt.c 1.0.17 2019/03/05 + * Version: @(#)keyboard_xt.c 1.0.18 2019/11/14 * * Authors: Sarah Walker, * Miran Grca, @@ -532,7 +532,7 @@ kbd_read(uint16_t port, void *priv) switch (port) { case 0x60: if ((kbd->type <= 1) && (kbd->pb & 0x80)) - ret = kbd->pd; + ret = (kbd->pd & ~0x02) | (hasfpu ? 0x02 : 0x00); else if (((kbd->type == 2) || (kbd->type == 3)) && (kbd->pb & 0x80)) ret = 0xff; /* According to Ruud on the PCem forum, this is supposed to return 0xFF on the XT. */ else @@ -559,10 +559,10 @@ kbd_read(uint16_t port, void *priv) LaserXT/3 = Bit 0: set = 512k, clear = 256k. */ #if defined(DEV_BRANCH) && defined(USE_LASERXT) if (kbd->type == 6) - ret = (mem_size == 512) ? 0x0d : 0x0c; + ret = ((mem_size == 512) ? 0x0d : 0x0c) | (hasfpu ? 0x02 : 0x00); else #endif - ret = kbd->pd & 0x0f; + ret = (kbd->pd & 0x0d) | (hasfpu ? 0x02 : 0x00); } } ret |= (ppispeakon ? 0x20 : 0);