From ba14ea32b6ae431c5ed8f382bff66041de8ebd28 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 4 Jan 2017 01:35:40 +0100 Subject: [PATCH] Added missing AT keyboard controller commands C1, C2, and D2. --- src/keyboard_at.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/keyboard_at.c b/src/keyboard_at.c index 2f9ef9c50..2bfc0c00d 100644 --- a/src/keyboard_at.c +++ b/src/keyboard_at.c @@ -307,6 +307,10 @@ write_register: keyboard_at.output_port = val; break; + case 0xd2: /*Write to keyboard output buffer*/ + keyboard_at_adddata_keyboard(val); + break; + case 0xd3: /*Write to mouse output buffer*/ keyboard_at_adddata_mouse(val); break; @@ -566,6 +570,16 @@ write_register: // keyboard_at_adddata(keyboard_at.input_port | 4); // keyboard_at.input_port = ((keyboard_at.input_port + 1) & 3) | (keyboard_at.input_port & 0xfc); break; + + case 0xc1: /*Copy bits 0 to 3 of input port to status bits 4 to 7*/ + keyboard_at.status &= 0xf; + keyboard_at.status |= ((keyboard_at.input_port & 0xf) << 4); + break; + + case 0xc2: /*Copy bits 4 to 7 of input port to status bits 4 to 7*/ + keyboard_at.status &= 0xf; + keyboard_at.status |= (keyboard_at.input_port & 0xf0); + break; case 0xc9: /*AMI - block P22 and P23 ??? */ break; @@ -589,6 +603,10 @@ write_register: case 0xd1: /*Write output port*/ keyboard_at.want60 = 1; break; + + case 0xd2: /*Write keyboard output buffer*/ + keyboard_at.want60 = 1; + break; case 0xd3: /*Write mouse output buffer*/ keyboard_at.want60 = 1;