aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-02-28 02:52:07 +0000
committerJavier <dev.git@javispedro.com>2022-02-28 02:58:23 +0000
commit97b4a5b95e0f6a3fbe2f785b95dd92663f40c8cc (patch)
tree8c1c55a704bf7732a667f8728af74fd0ace0ede9
parentb649293e1f0b8ad13aeb4c662a4eeae78634c129 (diff)
downloadvbmouse-97b4a5b95e0f6a3fbe2f785b95dd92663f40c8cc.tar.gz
vbmouse-97b4a5b95e0f6a3fbe2f785b95dd92663f40c8cc.zip
fix README
-rw-r--r--README.md19
1 files changed, 14 insertions, 5 deletions
diff --git a/README.md b/README.md
index d26c58f..7898750 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
This is a mouse driver for Windows 3.x with VirtualBox mouse integration support.
-I have tested it with Windows 3.0 in real and 386 enhanced modes, as well as Windows 3.11 in 386 enhanced mode.
+I have tested it with Windows 3.0 in real and 386 enhanced modes, Windows 3.11 in 386 enhanced mode
+with paging on, as well as Windows 95 (Windows 9x can use 16-bit mouse drivers).
# Install
@@ -14,7 +15,7 @@ and point the Windows Setup program to it when it asks for a 3rd party mouse dri
# Building
-This requires [http://open-watcom.github.io/](OpenWatcom 2.0), albeit it may work with an older version,
+This requires [OpenWatcom 2.0](http://open-watcom.github.io/), albeit it may work with an older version,
and was only tested on a Linux host.
The included makefile is a wmake makefile. To build it just enter the OpenWatcom environment and run `wmake vbmouse.drv`.
@@ -33,9 +34,17 @@ The driver uses the real-mode PCI BIOS to request the current configuration of t
To communicate with the host, the guest must send the PCI device the (physical) address
of a buffer containing commands to be sent to the host.
The host will write back the response in the same buffer.
-Further details are available in [https://wiki.osdev.org/VirtualBox_Guest_Additions](OSDev).
-The only challenge here is getting the physical address from inside 386 protected mode Windows,
-but turns out this can be done with the `GetSelectorBase()` WINAPI.
+Further details are available in [OSDev](https://wiki.osdev.org/VirtualBox_Guest_Additions).
+
+The only challenge here is getting the physical address (what the VirtualBox PCI device expects)
+corresponding to a logical address (segment:offset) as seen from inside Windows.
+In real mode Windows, the segment can be converted to a physical address without difficulty.
+In 386 enhanced mode, the segment is actually a selector, but turns out one can obtain the base
+of a selector with the `GetSelectorBase()` WINAPI.
+However, if paging is enabled, that only computes the linear address, which is still not the same
+as the physical address.
+In this case, the [Virtual DMA services](https://en.wikipedia.org/wiki/Virtual_DMA_Services) are used
+to obtain the physical address, even though we are not doing DMA.
When VirtualBox is told that the guest wants absolute mouse information, VirtualBox will stop sending
relative mouse information via the PS/2 mouse. However, the PS/2 controller will still send interrupts