Finally got rid of the AT and PCI global variables.

This commit is contained in:
OBattler
2021-12-19 20:00:27 +01:00
parent 9ec4fd3bdd
commit bc90f99350
21 changed files with 104 additions and 92 deletions

View File

@@ -26,6 +26,8 @@
#include <86box/machine.h>
#include <86box/keyboard.h>
#include "cpu.h"
int keyboard_scan;
void (*keyboard_send)(uint16_t val);
@@ -103,7 +105,8 @@ key_process(uint16_t scan, int down)
if (!down && codes[scan].brk[0] == 0)
return;
if (AT && ((keyboard_mode & 3) == 3)) {
/* TODO: The keyboard controller needs to report the AT flag to us here. */
if (is286 && ((keyboard_mode & 3) == 3)) {
if (!keyboard_set3_all_break && !down && !(keyboard_set3_flags[codes[scan].mk[0]] & 2))
return;
}
@@ -212,7 +215,8 @@ keyboard_do_break(uint16_t scan)
{
scancode *codes = scan_table;
if (AT && ((keyboard_mode & 3) == 3)) {
/* TODO: The keyboard controller needs to report the AT flag to us here. */
if (is286 && ((keyboard_mode & 3) == 3)) {
if (!keyboard_set3_all_break &&
!recv_key[scan] &&
!(keyboard_set3_flags[codes[scan].mk[0]] & 2))