diff options
author | Jaroslav Hensl <emulator@emulace.cz> | 2024-11-27 00:53:51 +0100 |
---|---|---|
committer | Jaroslav Hensl <emulator@emulace.cz> | 2024-11-27 00:53:51 +0100 |
commit | e1619890b60bf83a7e0a28c3e038589208d76a72 (patch) | |
tree | 261da3521330b3e57ec79c89f53adbb6d54a8b78 | |
parent | 12ce43bf38e0c92c6565a4d3f91d2c9a7b230f04 (diff) | |
download | vmdisp9x-e1619890b60bf83a7e0a28c3e038589208d76a72.tar.gz |
SVGA_DefineGMRFB on right place, primary surfaces ballooning, added DDCAPS2 to header
-rw-r--r-- | dddrv.c | 28 | ||||
-rw-r--r-- | ddk/ddrawi.h | 95 | ||||
-rw-r--r-- | vmdahal.h | 2 | ||||
-rw-r--r-- | vxd_svga.c | 2 |
4 files changed, 122 insertions, 5 deletions
@@ -48,6 +48,8 @@ const static DD32BITDRIVERDATA_t drv_vmhal9x = { */
DWORD __loadds __far __fastcall HALDestroyDriver(LPDDHAL_DESTROYDRIVERDATA);
+#define FB_MEM_POOL 16777216UL
+
/*
* video memory pool usage
*/
@@ -265,11 +267,26 @@ static void buildDDHALInfo(VMDAHAL_t __far *hal, int modeidx) vidMem[0].dwFlags = VIDMEM_ISLINEAR;
vidMem[0].ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
- vidMem[0].fpStart = hda->vram_pm32 + hda->system_surface + hda->stride;
- vidMem[0].fpEnd = hda->vram_pm32 + hda->vram_size - hda->overlays_size - 1;
- hal->ddHALInfo.vmiData.dwNumHeaps = 1;
-
+ if(hda->system_surface + hda->stride < FB_MEM_POOL && hda->vram_size > FB_MEM_POOL)
+ {
+ vidMem[0].fpStart = hda->vram_pm32 + FB_MEM_POOL;
+ vidMem[0].fpEnd = hda->vram_pm32 + hda->vram_size - hda->overlays_size - 1;
+
+ vidMem[1].fpStart = hda->vram_pm32 + hda->system_surface + hda->stride;
+ vidMem[1].fpEnd = hda->vram_pm32 + FB_MEM_POOL - 1;
+ vidMem[1].dwFlags = VIDMEM_ISLINEAR;
+ vidMem[1].ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
+
+ hal->ddHALInfo.vmiData.dwNumHeaps = 2;
+ }
+ else
+ {
+ vidMem[0].fpStart = hda->vram_pm32 + hda->system_surface + hda->stride;
+ vidMem[0].fpEnd = hda->vram_pm32 + hda->vram_size - hda->overlays_size - 1;
+ hal->ddHALInfo.vmiData.dwNumHeaps = 1;
+ }
+
/*
* capabilities supported
*/
@@ -305,6 +322,9 @@ static void buildDDHALInfo(VMDAHAL_t __far *hal, int modeidx) hal->ddHALInfo.ddCaps.dwCaps |= DDCAPS_3D;
hal->ddHALInfo.ddCaps.ddsCaps.dwCaps |= hal->d3dhal_flags.ddscaps;
hal->ddHALInfo.ddCaps.dwZBufferBitDepths |= hal->d3dhal_flags.zcaps;
+#if 0
+ hal->ddHALInfo.ddCaps.dwCaps2 = DDCAPS2_NO2DDURING3DSCENE;
+#endif
}
if(can_flip)
diff --git a/ddk/ddrawi.h b/ddk/ddrawi.h index 33c89d4..0f37743 100644 --- a/ddk/ddrawi.h +++ b/ddk/ddrawi.h @@ -231,6 +231,101 @@ typedef struct DDSCAPS __far* LPDDSCAPS; */
#define DDCAPS_CANBLTSYSMEM 0x80000000l
+ /****************************************************************************
+ *
+ * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
+ *
+ ****************************************************************************/
+
+/*
+ * Display hardware is certified
+ */
+#define DDCAPS2_CERTIFIED 0x00000001l
+
+/*
+ * Driver cannot interleave 2D operations (lock and blt) to surfaces with
+ * Direct3D rendering operations between calls to BeginScene() and EndScene()
+ */
+#define DDCAPS2_NO2DDURING3DSCENE 0x00000002l
+
+/*
+ * Display hardware contains a video port
+ */
+#define DDCAPS2_VIDEOPORT 0x00000004l
+
+/*
+ * The overlay can be automatically flipped according to the video port
+ * VSYNCs, providing automatic doubled buffered display of video port
+ * data using an overlay
+ */
+#define DDCAPS2_AUTOFLIPOVERLAY 0x00000008l
+
+/*
+ * Overlay can display each field of interlaced data individually while
+ * it is interleaved in memory without causing jittery artifacts.
+ */
+#define DDCAPS2_CANBOBINTERLEAVED 0x00000010l
+
+/*
+ * Overlay can display each field of interlaced data individually while
+ * it is not interleaved in memory without causing jittery artifacts.
+ */
+#define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020l
+
+/*
+ * The overlay surface contains color controls (brightness, sharpness, etc.)
+ */
+#define DDCAPS2_COLORCONTROLOVERLAY 0x00000040l
+
+/*
+ * The primary surface contains color controls (gamma, etc.)
+ */
+#define DDCAPS2_COLORCONTROLPRIMARY 0x00000080l
+
+/*
+ * RGBZ -> RGB supported for 16:16 RGB:Z
+ */
+#define DDCAPS2_CANDROPZ16BIT 0x00000100l
+
+/*
+ * Driver supports non-local video memory.
+ */
+#define DDCAPS2_NONLOCALVIDMEM 0x00000200l
+
+/*
+ * Dirver supports non-local video memory but has different capabilities for
+ * non-local video memory surfaces. If this bit is set then so must
+ * DDCAPS2_NONLOCALVIDMEM.
+ */
+#define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400l
+
+/*
+ * Driver neither requires nor prefers surfaces to be pagelocked when performing
+ * blts involving system memory surfaces
+ */
+#define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800l
+
+/*
+ * Driver can create surfaces which are wider than the primary surface
+ */
+#define DDCAPS2_WIDESURFACES 0x00001000l
+
+/*
+ * Driver supports bob without using a video port by handling the
+ * DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip.
+ */
+#define DDCAPS2_CANFLIPODDEVEN 0x00002000l
+
+/*
+ * Driver supports bob using hardware
+ */
+#define DDCAPS2_CANBOBHARDWARE 0x00004000l
+
+/*
+ * Driver supports bltting any FOURCC surface to another surface of the same FOURCC
+ */
+#define DDCAPS2_COPYFOURCC 0x00008000l
+
/****************************************************************************
*
* DIRECTDRAWSURFACE CAPABILITY FLAGS
@@ -90,6 +90,8 @@ typedef struct VMDAHAL DWORD d3dhal_global;
DWORD d3dhal_callbacks;
VMDAHAL_D3DCAPS_t d3dhal_flags;
+
+ BOOL invalid;
} VMDAHAL_t;
#pragma pack(pop)
@@ -1113,8 +1113,8 @@ BOOL FBHDA_swap(DWORD offset) FBHDA_access_begin(0);
if(hda->bpp > 8)
{
- SVGA_DefineGMRFB();
hda->surface = offset;
+ SVGA_DefineGMRFB();
rc = TRUE;
}
FBHDA_access_end(0);
|