aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaroslav Hensl <emulator@emulace.cz>2024-04-27 01:24:03 +0200
committerJaroslav Hensl <emulator@emulace.cz>2024-04-27 01:24:03 +0200
commit60c366fe3c99d042036fb36affe3f9c73f83391f (patch)
tree5bf24f2db67485819163a61b653994d1a23dfc9b
parent7f151e52c991ebd013ff9523004b6584cfd5653e (diff)
downloadvmdisp9x-60c366fe3c99d042036fb36affe3f9c73f83391f.tar.gz
fixed FBHDA pointer + cleanup
-rw-r--r--modes.c16
-rw-r--r--pm16_calls.c70
-rw-r--r--vxd_svga.c13
-rw-r--r--vxd_vdd.c2
4 files changed, 8 insertions, 93 deletions
diff --git a/modes.c b/modes.c
index 33f4ad3..523e69c 100644
--- a/modes.c
+++ b/modes.c
@@ -254,22 +254,6 @@ int PhysicalEnable( void )
/* Allocate an LDT selector for the screen. */
if( !ScreenSelector ) {
ScreenSelector = ((DWORD)hda->vram_pm16) >> 16;
-#if 0
- if(ScreenSelector == 0)
- {
- ScreenSelector = DPMI_AllocLDTDesc(1);
- DPMI_SetSegBase(ScreenSelector, hda->vram_pm32);
- DPMI_SetSegLimit(ScreenSelector, hda->vram_size-1);
-
- /* update pointer in HDA */
- hda->vram_pm16 = ScreenSelector :> 0;
- }
-
- if( !ScreenSelector ) {
- dbg_printf( "PhysicalEnable: Invalid VRAM selector failed!\n" );
- return( 0 );
- }
-#endif
}
/* NB: Currently not used. DirectDraw would need the segment base. */
diff --git a/pm16_calls.c b/pm16_calls.c
index eb36c57..c391c74 100644
--- a/pm16_calls.c
+++ b/pm16_calls.c
@@ -54,6 +54,7 @@ extern void dbg_printf( const char *s, ... );
static DWORD VXD_VM = 0;
static DWORD vxd_fbhda16 = 0;
+static DWORD vxd_fbhda32 = 0;
static DWORD vxd_mouse16 = 0;
#pragma code_seg( _INIT )
@@ -96,6 +97,7 @@ BOOL VXD_VM_connect()
push ebx
push ecx
push edx
+ push esi
mov eax, VDD_REGISTER_DISPLAY_DRIVER_INFO
movzx ebx, word ptr [OurVMHandle]
@@ -103,7 +105,9 @@ BOOL VXD_VM_connect()
mov [vxd_fbhda16], edx
mov [vxd_mouse16], ecx
+ mov [vxd_fbhda32], esi
+ pop esi
pop edx
pop ecx
pop ebx
@@ -117,40 +121,8 @@ BOOL VXD_VM_connect()
void FBHDA_setup(FBHDA_t __far* __far* FBHDA, DWORD __far* FBHDA_linear)
{
-#if 0
- static DWORD linear;
- linear = 0;
-
- _asm
- {
- .386
- push eax
- push edx
- push ecx
-
- mov edx, OP_FBHDA_SETUP
- call dword ptr [VXD_VM]
- mov [linear], ecx
-
- pop ecx
- pop edx
- pop eax
- }
-
- if(linear)
- {
- void __far *longptr = NULL;
- WORD desc = DPMI_AllocLDTDesc(1);
- DPMI_SetSegBase(desc, linear);
- DPMI_SetSegLimit(desc, sizeof(FBHDA_t)-1);
-
- longptr = desc :> 0;
-
- *FBHDA = (FBHDA_t __far*)longptr;
- *FBHDA_linear = linear;
- }
-#endif
*FBHDA = (FBHDA_t __far*)vxd_fbhda16;
+ *FBHDA_linear = vxd_fbhda32;
}
void FBHDA_access_begin(DWORD flags)
@@ -323,38 +295,6 @@ BOOL mouse_load()
void mouse_buffer(void __far* __far* pBuf, DWORD __far* pLinear)
{
-#if 0
- static DWORD buffer;
-
- _asm
- {
- .386
- push eax
- push edx
- push ecx
-
- mov edx, OP_MOUSE_BUFFER
- call dword ptr [VXD_VM]
- mov [buffer],ecx
-
- pop ecx
- pop edx
- pop eax
- }
-
- if(buffer)
- {
- void __far *longptr = NULL;
- WORD desc = DPMI_AllocLDTDesc(1);
- DPMI_SetSegBase(desc, buffer);
- DPMI_SetSegLimit(desc, MOUSE_BUFFER_SIZE);
-
- longptr = desc :> 0;
-
- *pBuf = longptr;
- *pLinear = buffer;
- }
-#endif
*pBuf = (void __far*)vxd_mouse16;
}
diff --git a/vxd_svga.c b/vxd_svga.c
index 1899729..d64f440 100644
--- a/vxd_svga.c
+++ b/vxd_svga.c
@@ -1808,7 +1808,6 @@ void FBHDA_access_end(DWORD flags)
if(fb_lock_cnt == 0)
{
- /*BOOL need_sync = */
mouse_blit();
if(hda->bpp == 32)
@@ -1823,18 +1822,8 @@ void FBHDA_access_end(DWORD flags)
cmd_update->y = 0;
cmd_update->width = hda->width;
cmd_update->height = hda->height;
-#if 0
- if(need_sync)
- {
- SVGA_CMB_submit(cmdbuf, cmd_offset, NULL, SVGA_CB_SYNC, 0);
- }
- else
- {
- SVGA_CMB_submit(cmdbuf, cmd_offset, NULL, 0, 0);
- }
-#else
+
SVGA_CMB_submit(cmdbuf, cmd_offset, NULL, SVGA_CB_SYNC, 0);
-#endif
}
}
diff --git a/vxd_vdd.c b/vxd_vdd.c
index 8f15f11..032ed2f 100644
--- a/vxd_vdd.c
+++ b/vxd_vdd.c
@@ -152,10 +152,12 @@ VDDPROC(REGISTER_DISPLAY_DRIVER, register_display_driver)
EAX -> VXD_VM (thisVM)
EDX -> fbhda
ECX -> mouse_buffer
+ ESI -> fbhda linear
*/
state->Client_EAX = ThisVM;
state->Client_EDX = hda_pm16;
state->Client_ECX = mouse_pm16;
+ state->Client_ESI = (DWORD)hda;
VDD_CY;
}