aboutsummaryrefslogtreecommitdiffstats
path: root/init.c
diff options
context:
space:
mode:
authorJaroslav Hensl <jara@hensl.cz>2024-01-31 23:57:00 +0100
committerJaroslav Hensl <jara@hensl.cz>2024-01-31 23:57:00 +0100
commitcf7b049839923f86fed97cfe7d8c17952a3fe79a (patch)
tree70e5b14cbdcf92429a9608316768e7154e3a0b6f /init.c
parent4cc02044b5cd8d5a3791f847198b37817fc60b78 (diff)
downloadvmdisp9x-cf7b049839923f86fed97cfe7d8c17952a3fe79a.tar.gz
driver code refactoring / PART1: vmware code
Diffstat (limited to 'init.c')
-rw-r--r--init.c38
1 files changed, 25 insertions, 13 deletions
diff --git a/init.c b/init.c
index 510a27f..8a66f1e 100644
--- a/init.c
+++ b/init.c
@@ -32,13 +32,8 @@ THE SOFTWARE.
#include "minidrv.h"
#include <configmg.h>
-#ifdef SVGA
-#include <stdint.h>
-#endif
-
-#if defined(SVGA) || defined(QEMU)
-# include "vxdcall.h"
-#endif
+#include "pm16_calls.h"
+#include "3d_accel.h"
/* GlobalSmartPageLock is a semi-undocumented function. Not officially
* documented but described in KB Article Q180586. */
@@ -318,9 +313,19 @@ UINT FAR DriverInit( UINT cbHeap, UINT hModule, LPSTR lpCmdLine )
dbg_printf("DriverInit: LfbBase is %lX\n", LfbBase);
- if(!VXD_load())
+ /* connect to 32bit RING-0 driver */
+ if(!VXD_VM_connect())
{
- dbg_printf("VXD load failure!\n");
+ dbg_printf("VXD connect failure!\n");
+ return 0;
+ }
+
+ dbg_printf("VXD connect success!\n");
+ FBHDA_setup(&hda, &hda_linear);
+
+ if(hda == NULL)
+ {
+ dbg_printf("DriverInit: failed to get FBHDA!\n");
return 0;
}
@@ -344,14 +349,21 @@ UINT FAR DriverInit( UINT cbHeap, UINT hModule, LPSTR lpCmdLine )
/* Read the display configuration before doing anything else. */
ReadDisplayConfig();
-#ifdef SVGA
/* connect to 32bit RING-0 driver */
- if(!VXD_load())
+ if(!VXD_VM_connect())
{
- dbg_printf("VXD load failure!\n");
+ dbg_printf("VXD connect failure!\n");
+ return 0;
+ }
+
+ dbg_printf("VXD connect success!\n");
+ FBHDA_setup(&hda, &hda_linear);
+
+ if(hda == NULL)
+ {
+ dbg_printf("DriverInit: failed to get FBHDA!\n");
return 0;
}
-#endif
return( 1 ); /* Success. */
}