aboutsummaryrefslogtreecommitdiffstats
path: root/vxd_lib.c
diff options
context:
space:
mode:
authorJaroslav Hensl <jara@hensl.cz>2024-07-22 18:49:18 +0200
committerJaroslav Hensl <jara@hensl.cz>2024-07-22 18:49:18 +0200
commit3a3ca1abfa25d3d595bbb966a261eaede765a80e (patch)
tree7c2a8327dde04975ff312f67bdc1b83d87535418 /vxd_lib.c
parentb62d9ec9bc8ba7db0fc191ba8458db3c70b253cf (diff)
downloadvmdisp9x-3a3ca1abfa25d3d595bbb966a261eaede765a80e.tar.gz
VMW vGPU10 (2d), IRQ work (in progress)
Diffstat (limited to 'vxd_lib.c')
-rw-r--r--vxd_lib.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/vxd_lib.c b/vxd_lib.c
index eade7b2..cff6666 100644
--- a/vxd_lib.c
+++ b/vxd_lib.c
@@ -27,6 +27,7 @@ THE SOFTWARE.
#include "winhack.h"
#include "vmm.h"
#include "vxd.h"
+#include "vpicd.h"
#include "svga_all.h"
@@ -474,3 +475,47 @@ DWORD __declspec(naked) __cdecl _RegQueryValueEx(DWORD hKey, char *lpszValueName
VMMJmp(_RegQueryValueEx);
}
+void Enable_Global_Trapping(DWORD port)
+{
+ static DWORD sPort = 0;
+ sPort = port;
+
+ _asm push edx
+ _asm mov edx, [sPort];
+ VMMCall(Enable_Global_Trapping);
+ _asm pop edx
+}
+
+void Disable_Global_Trapping(DWORD port)
+{
+ static DWORD sPort = 0;
+ sPort = port;
+
+ _asm push edx
+ _asm mov edx, [sPort];
+ VMMCall(Disable_Global_Trapping);
+ _asm pop edx
+}
+
+BOOL VPICD_Virtualize_IRQ(struct _VPICD_IRQ_Descriptor *vid)
+{
+ static VPICD_IRQ_Descriptor *svid;
+ static BOOL r;
+
+ r = 0;
+ svid = vid;
+
+ _asm {
+ push edi
+ mov edi, [svid]
+ };
+ VxDCall(VPICD, Virtualize_IRQ)
+ _asm {
+ jc Virtualize_IRQ_err
+ mov [r], 1
+ Virtualize_IRQ_err:
+ pop edi
+ };
+
+ return r;
+}