From 5b58fcfab2eb1c9ba2c384d7ca6d3a6c1d8caecf Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 2 Jul 2023 16:58:31 +0200 Subject: [PATCH] The Lucky Star LS-486E and Rise R418 are now marked as having the PS/2 keyboard controller IRQ latch (new machine bus flag!) without actually having the PS/2 ports. --- src/include/86box/machine.h | 18 ++++++++++-------- src/machine/machine_table.c | 4 ++-- src/pic.c | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index d954914ee..ec2919a7c 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -30,14 +30,16 @@ #define MACHINE_BUS_CARTRIDGE 0x00000004 /* sys has two cartridge bays */ #define MACHINE_BUS_ISA16 0x00000008 /* sys has ISA16 bus - PC/AT architecture */ #define MACHINE_BUS_CBUS 0x00000010 /* sys has C-BUS bus */ -#define MACHINE_BUS_PS2 0x00000020 /* system has PS/2 keyboard and mouse ports */ -#define MACHINE_BUS_EISA 0x00000040 /* sys has EISA bus */ -#define MACHINE_BUS_VLB 0x00000080 /* sys has VL bus */ -#define MACHINE_BUS_MCA 0x00000100 /* sys has MCA bus */ -#define MACHINE_BUS_PCI 0x00000200 /* sys has PCI bus */ -#define MACHINE_BUS_PCMCIA 0x00000400 /* sys has PCMCIA bus */ -#define MACHINE_BUS_AGP 0x00000800 /* sys has AGP bus */ -#define MACHINE_BUS_AC97 0x00001000 /* sys has AC97 bus (ACR/AMR/CNR slot) */ +#define MACHINE_BUS_PS2_LATCH 0x00000020 /* system has PS/2 keyboard controller IRQ latch */ +#define MACHINE_BUS_PS2_PORTS 0x00000040 /* system has PS/2 keyboard and mouse ports */ +#define MACHINE_BUS_PS2 (MACHIN_BUS_PS2_LATCH | MACHINE_BUS_PS2_PORTS) +#define MACHINE_BUS_EISA 0x00000080 /* sys has EISA bus */ +#define MACHINE_BUS_VLB 0x00000100 /* sys has VL bus */ +#define MACHINE_BUS_MCA 0x00000200 /* sys has MCA bus */ +#define MACHINE_BUS_PCI 0x00000400 /* sys has PCI bus */ +#define MACHINE_BUS_PCMCIA 0x00000800 /* sys has PCMCIA bus */ +#define MACHINE_BUS_AGP 0x00001000 /* sys has AGP bus */ +#define MACHINE_BUS_AC97 0x00002000 /* sys has AC97 bus (ACR/AMR/CNR slot) */ /* Aliases. */ #define MACHINE_CASSETTE (MACHINE_BUS_CASSETTE) /* sys has cassette port */ #define MACHINE_CARTRIDGE (MACHINE_BUS_CARTRIDGE) /* sys has two cartridge bays */ diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 21f2976fa..053ca791b 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -6799,7 +6799,7 @@ const machine_t machines[] = { .min_multi = 0, .max_multi = 0 }, - .bus_flags = MACHINE_PCI, + .bus_flags = MACHINE_BUS_PS2_LATCH | MACHINE_PCI, .flags = MACHINE_IDE_DUAL | MACHINE_APM, .ram = { .min = 1024, @@ -6877,7 +6877,7 @@ const machine_t machines[] = { .min_multi = 0, .max_multi = 0 }, - .bus_flags = MACHINE_PCI, + .bus_flags = MACHINE_BUS_PS2_LATCH | MACHINE_PCI, .flags = MACHINE_IDE_DUAL | MACHINE_APM, .ram = { .min = 1024, diff --git a/src/pic.c b/src/pic.c index ffb370ce2..7d62e8124 100644 --- a/src/pic.c +++ b/src/pic.c @@ -584,7 +584,7 @@ pic_reset_hard(void) /* The situation is as follows: There is a giant mess when it comes to these latches on real hardware, to the point that there's even boards with board-level latched that get used in place of the latches on the chipset, therefore, I'm just doing this here for the sake of simplicity. */ - if (machine_has_bus(machine, MACHINE_BUS_PS2)) { + if (machine_has_bus(machine, MACHINE_BUS_PS2_LATCH)) { pic_kbd_latch(0x01); pic_mouse_latch(0x01); } else {