diff --git a/Cxbe.dsp b/Cxbe.dsp index fec5f6a5d..59491cee7 100644 --- a/Cxbe.dsp +++ b/Cxbe.dsp @@ -23,8 +23,8 @@ CFG=Cxbe - Win32 Debug # Begin Project # PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" +# PROP Scc_ProjName "Cxbe" +# PROP Scc_LocalPath "." CPP=cl.exe RSC=rc.exe @@ -67,7 +67,8 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /Zi /Od /I "Include" /I "Include/Core/" /I "Include/Standard" /I "Include/Standard/Cxbe" /I "Include/Win32/" /I "Include/Win32/CxbxKrnl/" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /Zi /Od /I "Include" /I "Include/Core/" /I "Include/Standard" /I "Include/Standard/Cxbe" /I "Include/Win32/" /I "Include/Win32/CxbxKrnl/" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# SUBTRACT CPP /Fr # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe diff --git a/Cxbx.dsp b/Cxbx.dsp index fd25a55c3..8a841b3d4 100644 --- a/Cxbx.dsp +++ b/Cxbx.dsp @@ -23,8 +23,8 @@ CFG=Cxbx - Win32 Release # Begin Project # PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" +# PROP Scc_ProjName "Cxbx" +# PROP Scc_LocalPath "." CPP=cl.exe MTL=midl.exe RSC=rc.exe @@ -74,7 +74,8 @@ PostBuild_Cmds=cd PostBuild upxCxbx.bat # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /Zi /Od /I "Include" /I "Include/Core/" /I "Include/Win32/" /I "Include/Win32/Cxbxkrnl" /I "Include/Win32/Cxbx" /I "Include/Win32/Cxbx/jpegdec" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fr /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /Zi /Od /I "Include" /I "Include/Core/" /I "Include/Win32/" /I "Include/Win32/Cxbxkrnl" /I "Include/Win32/Cxbx" /I "Include/Win32/Cxbx/jpegdec" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# SUBTRACT CPP /Fr # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" diff --git a/Cxbx.dsw b/Cxbx.dsw index 2de057b28..73b22f602 100644 --- a/Cxbx.dsw +++ b/Cxbx.dsw @@ -7,6 +7,10 @@ Project: "Cxbe"=.\Cxbe.dsp - Package Owner=<4> Package=<5> {{{ + begin source code control + Cxbe + . + end source code control }}} Package=<4> @@ -19,6 +23,10 @@ Project: "Cxbx"=.\Cxbx.dsp - Package Owner=<4> Package=<5> {{{ + begin source code control + Cxbx + . + end source code control }}} Package=<4> @@ -34,6 +42,10 @@ Project: "CxbxKrnl"=.\CxbxKrnl.dsp - Package Owner=<4> Package=<5> {{{ + begin source code control + CxbxKrnl + . + end source code control }}} Package=<4> diff --git a/Cxbx.opt b/Cxbx.opt index 44988857d..b691e09a7 100644 Binary files a/Cxbx.opt and b/Cxbx.opt differ diff --git a/CxbxKrnl.dsp b/CxbxKrnl.dsp index 74ba37476..ee07d961e 100644 --- a/CxbxKrnl.dsp +++ b/CxbxKrnl.dsp @@ -23,8 +23,8 @@ CFG=CxbxKrnl - Win32 Debug # Begin Project # PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" +# PROP Scc_ProjName "CxbxKrnl" +# PROP Scc_LocalPath "." CPP=cl.exe MTL=midl.exe RSC=rc.exe @@ -70,7 +70,8 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CXBXKRNL_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "Include" /I "Include/Core/" /I "Include/Win32/" /I "Include/Win32/Cxbx" /I "Include/Win32/CxbxKrnl" /I "Include/Win32/CxbxKrnl/HLEDataBase" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CXBXKRNL_EXPORTS" /FR /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "Include" /I "Include/Core/" /I "Include/Win32/" /I "Include/Win32/Cxbx" /I "Include/Win32/CxbxKrnl" /I "Include/Win32/CxbxKrnl/HLEDataBase" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CXBXKRNL_EXPORTS" /YX /FD /GZ /c +# SUBTRACT CPP /Fr # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" diff --git a/Source/Win32/CxbxKrnl/EmuD3D8.cpp b/Source/Win32/CxbxKrnl/EmuD3D8.cpp index 5c686d58f..1a368a3e0 100644 --- a/Source/Win32/CxbxKrnl/EmuD3D8.cpp +++ b/Source/Win32/CxbxKrnl/EmuD3D8.cpp @@ -2317,8 +2317,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexShaderConstant { EmuSwapFS(); // Win2k/XP FS -#ifdef _DEBUG_TRACK_VS_CONST - printf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexShaderConstant\n" + DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexShaderConstant\n" "(\n" " Register : 0x%.08X\n" " pConstantData : 0x%.08X\n" @@ -2326,6 +2325,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexShaderConstant ");\n", GetCurrentThreadId(), Register, pConstantData, ConstantCount); +#ifdef _DEBUG_TRACK_VS_CONST for (uint32 i = 0; i < ConstantCount; i++) { printf("SetVertexShaderConstant, c%d (c%d) = { %f, %f, %f, %f }\n", diff --git a/Source/Win32/CxbxKrnl/HLEDataBase/D3D8.1.0.5558.inl b/Source/Win32/CxbxKrnl/HLEDataBase/D3D8.1.0.5558.inl index 35d85f47d..f691dd4a9 100644 --- a/Source/Win32/CxbxKrnl/HLEDataBase/D3D8.1.0.5558.inl +++ b/Source/Win32/CxbxKrnl/HLEDataBase/D3D8.1.0.5558.inl @@ -76,6 +76,77 @@ SOOVPA<11> IDirect3DDevice8_SelectVertexShader_1_0_5558 = } }; +// ****************************************************************** +// * IDirect3DDevice8_SetVertexShaderConstant1 +// ****************************************************************** +SOOVPA<11> IDirect3DDevice8_SetVertexShaderConstant1_1_0_5558 = +{ + 0, // Large == 0 + 11, // Count == 11 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // IDirect3DDevice8_SetVertexShaderConstant1+0x05 : add eax, 0x1C + { 0x05, 0x83 }, // (Offset,Value)-Pair #1 + { 0x06, 0xC0 }, // (Offset,Value)-Pair #2 + { 0x07, 0x1C }, // (Offset,Value)-Pair #3 + + // IDirect3DDevice8_SetVertexShaderConstant1+0x0E : jnb +0x2E + { 0x0E, 0x73 }, // (Offset,Value)-Pair #4 + { 0x0F, 0x2E }, // (Offset,Value)-Pair #5 + + // IDirect3DDevice8_SetVertexShaderConstant1+0x28 : mov [eax-0x10], ecx + { 0x28, 0x89 }, // (Offset,Value)-Pair #6 + { 0x29, 0x48 }, // (Offset,Value)-Pair #7 + { 0x2A, 0xF0 }, // (Offset,Value)-Pair #8 + + // IDirect3DDevice8_SetVertexShaderConstant1+0x3D : retn + { 0x3D, 0xC3 }, // (Offset,Value)-Pair #9 + + // IDirect3DDevice8_SetVertexShaderConstant1+0x47 : jmp +0xB7 + { 0x47, 0xEB }, // (Offset,Value)-Pair #10 + { 0x48, 0xB7 }, // (Offset,Value)-Pair #11 + } +}; + +// ****************************************************************** +// * IDirect3DDevice8_SetVertexShaderConstantNotInlineFast +// ****************************************************************** +SOOVPA<12> IDirect3DDevice8_SetVertexShaderConstantNotInlineFast_1_0_5558 = +{ + 0, // Large == 0 + 12, // Count == 12 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // IDirect3DDevice8_SetVertexShaderConstantNotInlineFast+0x26 : cmp eax, 0x10 + { 0x26, 0x83 }, // (Offset,Value)-Pair #1 + { 0x27, 0xF8 }, // (Offset,Value)-Pair #2 + { 0x28, 0x10 }, // (Offset,Value)-Pair #3 + + // IDirect3DDevice8_SetVertexShaderConstantNotInlineFast+0x29 : jnb +0x1F + { 0x29, 0x73 }, // (Offset,Value)-Pair #4 + { 0x2A, 0x1F }, // (Offset,Value)-Pair #5 + + // IDirect3DDevice8_SetVertexShaderConstantNotInlineFast+0x33 : or eax, 0x0B80 + { 0x33, 0x0D }, // (Offset,Value)-Pair #6 + { 0x34, 0x80 }, // (Offset,Value)-Pair #7 + { 0x35, 0x0B }, // (Offset,Value)-Pair #8 + { 0x36, 0x00 }, // (Offset,Value)-Pair #9 + + // IDirect3DDevice8_SetVertexShaderConstantNotInlineFast+0x3B : rep movsd + { 0x3B, 0xF3 }, // (Offset,Value)-Pair #10 + { 0x3C, 0xA5 }, // (Offset,Value)-Pair #11 + + // IDirect3DDevice8_SetVertexShaderConstantNotInlineFast+0x43 : emms + { 0x43, 0x0F }, // (Offset,Value)-Pair #12 + } +}; + // ****************************************************************** // * IDirect3DDevice8_SetViewport // ****************************************************************** @@ -599,6 +670,15 @@ OOVPATable D3D8_1_0_5558[] = "EmuIDirect3D8_CreateDevice" #endif }, + // D3DDevice_RunVertexStateShader (* unchanged since 4627 *) + { + (OOVPA*)&X_D3DDevice_RunVertexStateShader_1_0_4627, + XTL::EmuIDirect3DDevice8_RunVertexStateShader, + + #ifdef _DEBUG_TRACE + "D3DDevice_RunVertexStateShader" + #endif + }, // IDirect3DDevice8::LoadVertexShader { (OOVPA*)&IDirect3DDevice8_LoadVertexShader_1_0_5558, @@ -619,6 +699,26 @@ OOVPATable D3D8_1_0_5558[] = "EmuIDirect3DDevice8_SelectVertexShader" #endif }, + // IDirect3DDevice8::SetVertexShaderConstant1 + { + (OOVPA*)&IDirect3DDevice8_SetVertexShaderConstant1_1_0_5558, + + XTL::EmuIDirect3DDevice8_SetVertexShaderConstant1, + + #ifdef _DEBUG_TRACE + "EmuIDirect3DDevice8_SetVertexShaderConstant1" + #endif + }, + // IDirect3DDevice8::SetVertexShaderConstantNotInlineFast + { + (OOVPA*)&IDirect3DDevice8_SetVertexShaderConstantNotInlineFast_1_0_5558, + + XTL::EmuIDirect3DDevice8_SetVertexShaderConstantNotInline, + + #ifdef _DEBUG_TRACE + "EmuIDirect3DDevice8_SetVertexShaderConstantNotInlineFast" + #endif + }, // IDirect3DDevice8::Clear { (OOVPA*)&IDirect3DDevice8_Clear_1_0_5558,