From 1b0344660de2832b472b0a413c50ff7f111a9293 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 30 Aug 2026 02:21:09 +0200 Subject: first steps towards (optional) serial mouse support --- int15ps2.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'int15ps2.h') diff --git a/int15ps2.h b/int15ps2.h index db1b878..04d5a8d 100644 --- a/int15ps2.h +++ b/int15ps2.h @@ -23,6 +23,7 @@ #include #include #include "utils.h" +#include "bda.h" /** Standard PS/2 mouse IRQ. At least on VirtualBox. */ #define PS2_MOUSE_IRQ 12 @@ -95,6 +96,12 @@ enum ps2m_sample_rate { /** Invoked by the BIOS when there is a mouse event. */ typedef void (__far * LPFN_PS2CALLBACK)(); +static bool ps2m_installed() +{ + uint16_t equipment = bda_get_equipment(); + return equipment & (1 << 2); +} + static ps2m_err ps2m_init(uint8_t packet_size); #pragma aux ps2m_init = \ "stc" /* If nothing happens, assume failure */ \ -- cgit v1.2.3