Rewritten the PS/2 poll (without the password security state, that is yet to be done) and enabled the PS/2 KBC IRQ latch on all PCI machines as well (it is present at the very least on Intel SIO and PIIX), fixes Windows for Workgroups 3.11 input, and reduced mouse polling to 255 Hz (the maximums supported by PS/2 mice).

This commit is contained in:
OBattler
2023-04-08 00:40:57 +02:00
parent 1c8fd2c7fc
commit 289962319f
4 changed files with 113 additions and 59 deletions

View File

@@ -152,8 +152,8 @@ mouse_close(void)
static void
mouse_timer_poll(void *priv)
{
/* Poll at 3600 Hz. */
timer_on_auto(&mouse_timer, 277.0 + (7.0 / 9.0));
/* Poll at 255 Hz, maximum supported by PS/2 mic. */
timer_on_auto(&mouse_timer, 1000000.0 / 255.0);
#ifdef USE_GDBSTUB /* avoid a KBC FIFO overflow when CPU emulation is stalled */
if (gdbstub_step == GDBSTUB_EXEC)
@@ -186,8 +186,8 @@ mouse_reset(void)
timer_add(&mouse_timer, mouse_timer_poll, NULL, 0);
/* Poll at 3600 Hz. */
timer_on_auto(&mouse_timer, 277.0 + (7.0 / 9.0));
/* Poll at 255 Hz, maximum supported by PS/2 mic. */
timer_on_auto(&mouse_timer, 1000000.0 / 255.0);
}
/* Callback from the hardware driver. */