aboutsummaryrefslogtreecommitdiff
path: root/int33.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-03 00:03:15 +0200
committerJavier <dev.git@javispedro.com>2022-04-03 00:03:15 +0200
commit7d93442564b57c2d292df7f823c2115d3e0b8c12 (patch)
tree6a7e31e172ced11dde78f1b0a1f38fa2ab252697 /int33.h
parent3ca7b6c9cc23e118968b49a79f2b64fe4a3b73b3 (diff)
downloadvbados-7d93442564b57c2d292df7f823c2115d3e0b8c12.tar.gz
vbados-7d93442564b57c2d292df7f823c2115d3e0b8c12.zip
complete wheel support
Diffstat (limited to 'int33.h')
-rw-r--r--int33.h31
1 files changed, 25 insertions, 6 deletions
diff --git a/int33.h b/int33.h
index f97ba21..44f61f9 100644
--- a/int33.h
+++ b/int33.h
@@ -129,16 +129,22 @@ enum INT33_API {
/** Gets the current window coordinates (set by INT33_SET_HORIZONTAL_WINDOW).
* @return ax min_x, bx min_y, cx max_x, d max_y. */
INT33_GET_WINDOW = 0x31,
-};
-enum INT33_API_INTERNAL {
+ // Wheel API Extensions:
+ INT33_GET_CAPABILITIES = 0x11,
+
+ // Our internal API functions:
+ /** Obtains a pointer to the driver's data. */
INT33_GET_TSR_DATA = 0x7f
};
-enum {
- INT33_MOUSE_FOUND = 0xFFFF
+enum INT33_CAPABILITY_BITS {
+ INT33_CAPABILITY_MOUSE_API = 1 << 0
};
+#define INT33_WHEEL_API_MAGIC 'WM'
+#define INT33_MOUSE_FOUND 0xFFFF
+
enum INT33_MOUSE_TYPE {
INT33_MOUSE_TYPE_BUS = 1,
INT33_MOUSE_TYPE_SERIAL = 2,
@@ -181,14 +187,14 @@ static uint16_t int33_reset(void);
"int 0x33" \
__value [ax]
-static void int33_set_horizontal_window(uint16_t min, uint16_t max);
+static void int33_set_horizontal_window(int16_t min, int16_t max);
#pragma aux int33_set_horizontal_window = \
"mov ax, 0x7" \
"int 0x33" \
__parm [cx] [dx] \
__modify [ax]
-static void int33_set_vertical_window(uint16_t min, uint16_t max);
+static void int33_set_vertical_window(int16_t min, int16_t max);
#pragma aux int33_set_vertical_window = \
"mov ax, 0x8" \
"int 0x33" \
@@ -202,4 +208,17 @@ static void int33_set_event_handler(uint16_t event_mask, void (__far *handler)()
__parm [cx] [es dx] \
__modify [ax]
+static uint16_t int33_get_driver_version(void);
+#pragma aux int33_get_driver_version = \
+ "mov bx, 0" \
+ "mov ax, 0x24" \
+ "int 0x33" \
+ "cmp ax, -1" \
+ "jne end" \
+ "error:" \
+ "mov bx, 0" \
+ "end:" \
+ __value [bx] \
+ __modify [ax bx cx dx]
+
#endif