diff --git a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4134.inl b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4134.inl index 3d94f2e61..e43c4592a 100644 --- a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4134.inl +++ b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4134.inl @@ -1948,6 +1948,37 @@ OOVPA_NO_XREF(D3DDevice_UpdateOverlay, 4134, 11) { 0xA5, 0x89 }, // (Offset,Value)-Pair #11 OOVPA_END; +// ****************************************************************** +// * D3DDevice_GetModelView +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_GetModelView, 4134, 7) + + { 0x05, 0x57 }, + { 0x0A, 0x85 }, + { 0x10, 0xB0 }, + { 0x16, 0x10 }, + { 0x1C, 0x5E }, + { 0x22, 0xC1 }, + { 0x28, 0xE0 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_FlushVertexCache +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_FlushVertexCache, 4134, 10) + + { 0x00, 0x56 }, + { 0x07, 0x8B }, + { 0x08, 0x06 }, + { 0x0D, 0x05 }, + { 0x13, 0xC7 }, + { 0x15, 0x10 }, + { 0x17, 0x04 }, + { 0x1C, 0x00 }, + { 0x21, 0xC0 }, + { 0x26, 0xC3 }, +OOVPA_END; + // ****************************************************************** // * D3D8_4134 // ****************************************************************** @@ -2103,6 +2134,8 @@ OOVPATable D3D8_4134[] = { REGISTER_OOVPA(D3D_SetPushBufferSize, 4034, DISABLED), REGISTER_OOVPA(D3DDevice_EnableOverlay, 4134, PATCH), REGISTER_OOVPA(D3DDevice_UpdateOverlay, 4134, PATCH), + REGISTER_OOVPA(D3DDevice_GetModelView, 4134, PATCH), + REGISTER_OOVPA(D3DDevice_FlushVertexCache, 4134, PATCH), }; // ****************************************************************** diff --git a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl index 2dc5a2e66..2ca4e3273 100644 --- a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl +++ b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl @@ -99,28 +99,6 @@ OOVPA_NO_XREF(D3DDevice_BeginVisibilityTest, 4627, 11) { 0x26, 0x0C }, // (Offset,Value)-Pair #11 OOVPA_END; -// ****************************************************************** -// * Direct3D_CreateDevice -// ****************************************************************** -OOVPA_NO_XREF(Direct3D_CreateDevice, 5028, 8) - - // Direct3D_CreateDevice+0x0A : jnz +0x0A - { 0x0A, 0x75 }, // (Offset,Value)-Pair #1 - { 0x0B, 0x0A }, // (Offset,Value)-Pair #2 - - // Direct3D_CreateDevice+0x80 : repe stosd - { 0x80, 0xF3 }, // (Offset,Value)-Pair #3 - { 0x81, 0xAB }, // (Offset,Value)-Pair #4 - - // Direct3D_CreateDevice+0x83 : mov eax, esi - { 0x83, 0x8B }, // (Offset,Value)-Pair #5 - { 0x84, 0xC6 }, // (Offset,Value)-Pair #6 - - // Direct3D_CreateDevice+0x91 : retn 0x18 - { 0x91, 0xC2 }, // (Offset,Value)-Pair #7 - { 0x92, 0x18 }, // (Offset,Value)-Pair #8 -OOVPA_END; - // ****************************************************************** // * D3DDevice_EndVisibilityTest // ****************************************************************** diff --git a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5028.inl b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5028.inl index b486c2c2a..460169ea7 100644 --- a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5028.inl +++ b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5028.inl @@ -32,70 +32,663 @@ // * // ****************************************************************** +// ****************************************************************** +// * Direct3D_CreateDevice +// ****************************************************************** +OOVPA_NO_XREF(Direct3D_CreateDevice, 5028, 8) + + // Direct3D_CreateDevice+0x0A : jnz +0x0A + { 0x0A, 0x75 }, // (Offset,Value)-Pair #1 + { 0x0B, 0x0A }, // (Offset,Value)-Pair #2 + + // Direct3D_CreateDevice+0x80 : repe stosd + { 0x80, 0xF3 }, // (Offset,Value)-Pair #3 + { 0x81, 0xAB }, // (Offset,Value)-Pair #4 + + // Direct3D_CreateDevice+0x83 : mov eax, esi + { 0x83, 0x8B }, // (Offset,Value)-Pair #5 + { 0x84, 0xC6 }, // (Offset,Value)-Pair #6 + + // Direct3D_CreateDevice+0x91 : retn 0x18 + { 0x91, 0xC2 }, // (Offset,Value)-Pair #7 + { 0x92, 0x18 }, // (Offset,Value)-Pair #8 +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetRenderState_TextureFactor +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetRenderState_TextureFactor, 5028, 9) + + // D3DDevice_SetRenderState_TextureFactor+0x07 : mov eax, [esi+0x036C] + { 0x07, 0x8B }, // (Offset,Value)-Pair #1 + { 0x08, 0x86 }, // (Offset,Value)-Pair #2 + { 0x09, 0x6C }, // (Offset,Value)-Pair #3 + { 0x0A, 0x03 }, // (Offset,Value)-Pair #4 + + // D3DDevice_SetRenderState_TextureFactor+0x2F : nop + { 0x2F, 0x90 }, // (Offset,Value)-Pair #5 + + // D3DDevice_SetRenderState_TextureFactor+0x41 : retn 0x04 + { 0x41, 0xC2 }, // (Offset,Value)-Pair #6 + { 0x42, 0x04 }, // (Offset,Value)-Pair #7 + + // D3DDevice_SetRenderState_TextureFactor+0x4E : retn 0x04 + { 0x4E, 0xC2 }, // (Offset,Value)-Pair #8 + { 0x4F, 0x04 }, // (Offset,Value)-Pair #9 +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetRenderState_Dxt1NoiseEnable +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetRenderState_Dxt1NoiseEnable, 5028, 7) + + { 0x0F, 0xB4 }, + { 0x10, 0x15 }, + { 0x16, 0x0D }, + { 0x1F, 0x3C }, + { 0x34, 0x36 }, + { 0x58, 0x05 }, + { 0x75, 0x04 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetRenderState_ZEnable +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetRenderState_ZEnable, 5028, 8) + + { 0x13, 0x8B }, + { 0x22, 0xC9 }, + { 0x34, 0x89 }, + { 0x46, 0x0C }, + { 0x5A, 0x74 }, + { 0x6D, 0x8B }, + { 0x7C, 0xCE }, + { 0x8E, 0x00 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetRenderState_MultiSampleMask +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetRenderState_MultiSampleMask, 5028, 8) + + { 0x0A, 0xA3 }, + { 0x12, 0x56 }, + { 0x1C, 0x8B }, + { 0x2A, 0x85 }, + { 0x30, 0x01 }, + { 0x3D, 0xC7 }, + { 0x44, 0x78 }, + { 0x4E, 0x04 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetRenderState_SampleAlpha +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetRenderState_SampleAlpha, 5028, 7) + + { 0x0B, 0xC1 }, + { 0x15, 0x0B }, + { 0x1C, 0x8B }, + { 0x28, 0x85 }, + { 0x30, 0x07 }, + { 0x3B, 0xC7 }, + { 0x44, 0x83 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_CreateTexture2 +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_CreateTexture2, 5028, 8) + + { 0x10, 0x0F }, + { 0x14, 0x4C }, + { 0x18, 0x33 }, + { 0x1C, 0x05 }, + { 0x1F, 0x24 }, + { 0x43, 0xF8 }, + { 0x4A, 0x01 }, + { 0x4F, 0x64 }, +OOVPA_END; + +// ****************************************************************** +// * D3DTexture_LockRect +// ****************************************************************** +OOVPA_NO_XREF(D3DTexture_LockRect, 5028, 7) + + { 0x03, 0x14 }, + { 0x08, 0x8B }, + { 0x0D, 0x8B }, + { 0x12, 0x8B }, + { 0x17, 0x50 }, + { 0x20, 0xC2 }, + { 0x21, 0x14 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_BlockUntilVerticalBlank +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_BlockUntilVerticalBlank, 5028, 7) + + { 0x05, 0x6A }, + { 0x12, 0x00 }, + { 0x15, 0x6A }, + { 0x16, 0x06 }, + { 0x17, 0x05 }, + { 0x1C, 0x50 }, + { 0x23, 0xC3 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_GetBackBuffer2 +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_GetBackBuffer2, 5028, 12) + + // D3DDevice_GetBackBuffer2+0x04 : cmp eax, 0xFFFFFFFF + { 0x04, 0x83 }, // (Offset,Value)-Pair #1 + { 0x05, 0xF8 }, // (Offset,Value)-Pair #2 + { 0x06, 0xFF }, // (Offset,Value)-Pair #3 + + // D3DDevice_GetBackBuffer+0x0D : jnz +0x19 + { 0x0D, 0x75 }, // (Offset,Value)-Pair #4 + { 0x0E, 0x19 }, // (Offset,Value)-Pair #5 + + // D3DDevice_GetBackBuffer+0x15 : mov esi, [ecx+eax*4+0x15C0] + { 0x15, 0x8B }, // (Offset,Value)-Pair #6 + { 0x16, 0xB4 }, // (Offset,Value)-Pair #7 + { 0x17, 0x81 }, // (Offset,Value)-Pair #8 + { 0x18, 0xC0 }, // (Offset,Value)-Pair #9 + { 0x19, 0x15 }, // (Offset,Value)-Pair #10 + + // D3DDevice_GetBackBuffer+0x40 : retn 0x04 + { 0x40, 0xC2 }, // (Offset,Value)-Pair #11 + { 0x41, 0x04 }, // (Offset,Value)-Pair #12 +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_GetRenderTarget2 +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_GetRenderTarget2, 5028, 6) + + { 0x05, 0x56 }, + { 0x06, 0x8B }, + { 0x0A, 0x00 }, + { 0x0E, 0x74 }, + { 0x16, 0x8B }, + { 0x17, 0xC6 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_GetDepthStencilSurface2 +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_GetDepthStencilSurface2, 5028, 7) + + { 0x05, 0x56 }, + { 0x06, 0x8B }, + { 0x0A, 0x00 }, + { 0x0E, 0x75 }, + { 0x12, 0x5E }, + { 0x1A, 0x8B }, + { 0x1B, 0xC6 }, +OOVPA_END; + +// ****************************************************************** +// * D3D_GetDeviceCaps +// ****************************************************************** +OOVPA_NO_XREF(D3D_GetDeviceCaps, 5028, 7) + + { 0x04, 0x85 }, + { 0x0A, 0x08 }, + { 0x10, 0x83 }, + { 0x16, 0x08 }, + { 0x1C, 0xC2 }, + { 0x22, 0x0C }, + { 0x29, 0x33 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetViewport +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetViewport, 5028, 9) + + // D3DDevice_SetViewport+0x0A : mov eax, [esi+0x15B4] + { 0x0A, 0x8B }, // (Offset,Value)-Pair #1 + { 0x0B, 0x86 }, // (Offset,Value)-Pair #2 + { 0x0C, 0xB4 }, // (Offset,Value)-Pair #3 + { 0x0D, 0x15 }, // (Offset,Value)-Pair #4 + + // D3DDevice_SetViewport+0x63 : shl edi, cl + { 0x63, 0xD3 }, // (Offset,Value)-Pair #5 + { 0x64, 0xE7 }, // (Offset,Value)-Pair #6 + + // D3DDevice_SetViewport+0xDF : and ecx, 0x0F + { 0xDF, 0x83 }, // (Offset,Value)-Pair #7 + { 0xE0, 0xE1 }, // (Offset,Value)-Pair #8 + { 0xE1, 0x0F }, // (Offset,Value)-Pair #9 +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetLight +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetLight, 5028, 12) + + // D3DDevice_SetLight+0x11 : mov edi, [ebp+0x390] + { 0x11, 0x8B }, // (Offset,Value)-Pair #1 + { 0x12, 0xBD }, // (Offset,Value)-Pair #2 + { 0x13, 0x90 }, // (Offset,Value)-Pair #3 + { 0x14, 0x03 }, // (Offset,Value)-Pair #4 + + // D3DDevice_SetLight+0x30 : shl eax, 0x04 + { 0x30, 0xC1 }, // (Offset,Value)-Pair #5 + { 0x31, 0xE0 }, // (Offset,Value)-Pair #6 + { 0x32, 0x04 }, // (Offset,Value)-Pair #7 + + // D3DDevice_SetLight+0xBD : rep stosb + { 0xBD, 0xF3 }, // (Offset,Value)-Pair #8 + { 0xBE, 0xAB }, // (Offset,Value)-Pair #9 + + // D3DDevice_SetLight+0xFD : mov ecx, [ebx+0x68] + { 0xFD, 0x8B }, // (Offset,Value)-Pair #10 + { 0xFE, 0x4B }, // (Offset,Value)-Pair #11 + { 0xFF, 0x68 }, // (Offset,Value)-Pair #12 +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_LightEnable +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_LightEnable, 5028, 13) + + // D3DDevice_LightEnable+0x0F : cmp ebx, [esi+0x0390] + { 0x0F, 0x3B }, // (Offset,Value)-Pair #1 + { 0x10, 0x9E }, // (Offset,Value)-Pair #2 + { 0x11, 0x90 }, // (Offset,Value)-Pair #3 + { 0x12, 0x03 }, // (Offset,Value)-Pair #4 + + // D3DDevice_LightEnable+0x6B : test eax, eax + { 0x6B, 0x85 }, // (Offset,Value)-Pair #5 + { 0x6C, 0xC0 }, // (Offset,Value)-Pair #6 + + // D3DDevice_LightEnable+0x9E : mov eax, [eax+0x8C] + { 0x9E, 0x8B }, // (Offset,Value)-Pair #7 + { 0x9F, 0x80 }, // (Offset,Value)-Pair #8 + { 0xA0, 0x8C }, // (Offset,Value)-Pair #9 + + // D3DDevice_LightEnable+0xBC : jz +0x12 + { 0xBC, 0x74 }, // (Offset,Value)-Pair #10 + { 0xBD, 0x12 }, // (Offset,Value)-Pair #11 + + // D3DDevice_LightEnable+0xE1 : retn 0x08 + { 0xE1, 0xC2 }, // (Offset,Value)-Pair #12 + { 0xE2, 0x08 }, // (Offset,Value)-Pair #13 +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetIndices +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetIndices, 5028, 7) + + { 0x0F, 0x10 }, + { 0x20, 0xC7 }, + { 0x31, 0xC0 }, + { 0x42, 0x78 }, + { 0x53, 0xBE }, + { 0x64, 0x89 }, + { 0x75, 0x10 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetTileNoWait +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetTileNoWait, 5028, 11) + + // D3DDevice_SetTileNoWait+0x06 : sub esp, 0x18 + { 0x06, 0x83 }, // (Offset,Value)-Pair #1 + { 0x07, 0xEC }, // (Offset,Value)-Pair #2 + { 0x08, 0x18 }, // (Offset,Value)-Pair #3 + + // D3DDevice_SetTileNoWait+0x15 : cmp [esi+4], eax + { 0x15, 0x39 }, // (Offset,Value)-Pair #4 + { 0x16, 0x46 }, // (Offset,Value)-Pair #5 + { 0x17, 0x04 }, // (Offset,Value)-Pair #6 + + // D3DDevice_SetTileNoWait+0x3D : lea edi, [edx+ecx*8+0x1660] + { 0x3D, 0x8D }, // (Offset,Value)-Pair #7 + { 0x3E, 0xBC }, // (Offset,Value)-Pair #8 + { 0x3F, 0xCA }, // (Offset,Value)-Pair #9 + { 0x40, 0x60 }, // (Offset,Value)-Pair #10 + { 0x41, 0x16 }, // (Offset,Value)-Pair #11 +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_Clear +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_Clear, 5028, 8) + { 0x1D, 0x8A }, + { 0x3C, 0x8B }, + { 0x5B, 0x00 }, + { 0x7A, 0xFD }, + { 0x99, 0x25 }, + { 0xB8, 0x00 }, + { 0xD7, 0x75 }, + { 0xF6, 0xFF }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_DrawVertices +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_DrawVertices, 5028, 7) + + { 0x12, 0x8B }, + { 0x26, 0x8B }, + { 0x37, 0x00 }, + { 0x4A, 0x27 }, + { 0x5D, 0x89 }, + { 0x70, 0x75 }, + { 0x83, 0x40 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_DrawIndexedVertices +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_DrawIndexedVertices, 5028, 8) + + { 0x1E, 0x5E }, + { 0x3E, 0x17 }, + { 0x5E, 0x00 }, + { 0x7E, 0x8B }, + { 0x9E, 0x89 }, + { 0xBE, 0x2B }, + { 0xDE, 0x00 }, + { 0xFE, 0x04 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetVertexData2f +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetVertexData2f, 5028, 8) + + { 0x07, 0x8B }, + { 0x0C, 0x72 }, + { 0x13, 0x8B }, + { 0x1A, 0x80 }, + { 0x21, 0x0C }, + { 0x28, 0x89 }, + { 0x2F, 0xC0 }, + { 0x36, 0x00 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_Begin +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_Begin, 5028, 7) + + { 0x07, 0xE8 }, + { 0x0C, 0x8B }, + { 0x13, 0xE8 }, + { 0x1A, 0x24 }, + { 0x21, 0x00 }, + { 0x28, 0x89 }, + { 0x2F, 0x00 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_LoadVertexShader +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_LoadVertexShader, 5028, 7) + + { 0x09, 0x45 }, + { 0x14, 0x75 }, + { 0x21, 0x8B }, + { 0x2D, 0x8B }, + { 0x35, 0x04 }, + { 0x40, 0x00 }, + { 0x4B, 0x5E }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetShaderConstantMode +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetShaderConstantMode, 5028, 8) + + { 0x1D, 0xFD }, + { 0x3C, 0x8B }, + { 0x5B, 0x0B }, + { 0x7A, 0x56 }, + { 0x99, 0xC0 }, + { 0xB8, 0x00 }, + { 0xD7, 0x89 }, + { 0xF6, 0x00 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetVertexShader +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetVertexShader, 5028, 14) + + // D3DDevice_SetVertexShader+0x06 : test bl, 1 + { 0x06, 0xF6 }, // (Offset,Value)-Pair #1 + { 0x07, 0xC3 }, // (Offset,Value)-Pair #2 + { 0x08, 0x01 }, // (Offset,Value)-Pair #3 + + // D3DDevice_SetVertexShader+0x11 : mov eax, [esi+0x037C] + { 0x11, 0x8B }, // (Offset,Value)-Pair #4 + { 0x12, 0x86 }, // (Offset,Value)-Pair #5 + { 0x13, 0x7C }, // (Offset,Value)-Pair #6 + { 0x14, 0x03 }, // (Offset,Value)-Pair #7 + + // D3DDevice_SetVertexShader+0x90 : retn 0x04 + { 0x90, 0xC2 }, // (Offset,Value)-Pair #8 + { 0x91, 0x04 }, // (Offset,Value)-Pair #9 + + // D3DDevice_SetVertexShader+0xB0 : mov dword ptr [eax], 0x4194C + { 0xB0, 0xC7 }, // (Offset,Value)-Pair #10 + { 0xB1, 0x00 }, // (Offset,Value)-Pair #11 + { 0xB2, 0x4C }, // (Offset,Value)-Pair #12 + { 0xB3, 0x19 }, // (Offset,Value)-Pair #13 + { 0xB4, 0x04 }, // (Offset,Value)-Pair #14 +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_Swap +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_Swap, 5028, 7) + + { 0x1B, 0xE8 }, + { 0x38, 0xC3 }, + { 0x55, 0xC0 }, + { 0x72, 0x3F }, + { 0x8F, 0x8E }, + { 0xAC, 0xC6 }, + { 0xC9, 0xC0 }, +OOVPA_END; + +// ****************************************************************** +// * D3D::SetFence +// ****************************************************************** +OOVPA_XREF(D3D_SetFence, 5028, 7, + + XREF_D3D_SETFENCE, + XRefZero) + + { 0x0E, 0x05 }, + { 0x18, 0xC9 }, + { 0x3E, 0x3F }, + { 0x5E, 0x28 }, + { 0x86, 0x5D }, + { 0x98, 0xE8 }, + { 0xA2, 0x04 }, +OOVPA_END; + +// ****************************************************************** +// * D3D::BlockOnTime +// ****************************************************************** +OOVPA_XREF(D3D_BlockOnTime, 5028, 6, + + XREF_D3D_BLOCKONTIME, + XRefZero) + + { 0x09, 0x30 }, + { 0x27, 0x07 }, + { 0x55, 0x7E }, + { 0x7B, 0x58 }, + { 0xE3, 0x80 }, + { 0xF5, 0x2C }, +OOVPA_END; + +// ****************************************************************** +// * D3D_KickOffAndWaitForIdle +// ****************************************************************** +OOVPA_NO_XREF(D3D_KickOffAndWaitForIdle, 5028, 9) + + // D3D_KickOffAndWaitForIdle+0x00 : mov eax, [addr] + { 0x00, 0xA1 }, // (Offset,Value)-Pair #1 + + // D3D_KickOffAndWaitForIdle+0x05 : mov ecx, [eax+0x2C] + { 0x05, 0x8B }, // (Offset,Value)-Pair #2 + { 0x06, 0x48 }, // (Offset,Value)-Pair #3 + { 0x07, 0x2C }, // (Offset,Value)-Pair #4 + + // D3D_KickOffAndWaitForIdle+0x08 : push 2 + { 0x08, 0x6A }, // (Offset,Value)-Pair #5 + { 0x09, 0x02 }, // (Offset,Value)-Pair #6 + + // D3D_KickOffAndWaitForIdle+0x0A : push ecx + { 0x0A, 0x51 }, // (Offset,Value)-Pair #7 + + // D3D_KickOffAndWaitForIdle+0x0B : call [addr] + { 0x0B, 0xE8 }, // (Offset,Value)-Pair #8 + + // D3D_KickOffAndWaitForIdle+0x10 : retn + { 0x10, 0xC3 }, // (Offset,Value)-Pair #9 +OOVPA_END; + +// ****************************************************************** +// * Get2DSurfaceDesc +// ****************************************************************** +OOVPA_NO_XREF(Get2DSurfaceDesc, 5028, 10) + + // Get2DSurfaceDesc+0x2B : movzx edx, byte ptr [edi+0x0D] + { 0x2B, 0x0F }, // (Offset,Value)-Pair #1 + { 0x2C, 0xB6 }, // (Offset,Value)-Pair #2 + { 0x2D, 0x57 }, // (Offset,Value)-Pair #3 + { 0x2E, 0x0D }, // (Offset,Value)-Pair #4 + + // Get2DSurfaceDesc+0x52 : mov edx, [eax+0x15C0] + { 0x52, 0x8B }, // (Offset,Value)-Pair #5 + { 0x53, 0x90 }, // (Offset,Value)-Pair #6 + { 0x54, 0xC0 }, // (Offset,Value)-Pair #7 + { 0x55, 0x15 }, // (Offset,Value)-Pair #8 + + // Get2DSurfaceDesc+0xAE : retn 0x0C + { 0xAE, 0xC2 }, // (Offset,Value)-Pair #9 + { 0xAF, 0x0C }, // (Offset,Value)-Pair #10 +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_SetVertexShaderConstantNotInline +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_SetVertexShaderConstantNotInline, 5028, 9) + + { 0x0B, 0x10 }, + { 0x10, 0x75 }, + { 0x11, 0x15 }, + { 0x12, 0x56 }, + { 0x13, 0x57 }, + { 0x14, 0x8B }, + { 0x1A, 0xC7 }, + { 0x31, 0xC2 }, + { 0x32, 0x04 }, +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_AddRef +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_AddRef, 5028, 10) + + // D3DDevice_AddRef+0x00 : mov eax, [addr] + { 0x00, 0xA1 }, // (Offset,Value)-Pair #1 + + // D3DDevice_AddRef+0x05 : mov ecx, [eax+0x04FC] + { 0x05, 0x8B }, // (Offset,Value)-Pair #2 + { 0x06, 0x88 }, // (Offset,Value)-Pair #3 + { 0x07, 0xFC }, // (Offset,Value)-Pair #4 + { 0x08, 0x04 }, // (Offset,Value)-Pair #5 + + // D3DDevice_AddRef+0x0B : inc ecx + { 0x0B, 0x41 }, // (Offset,Value)-Pair #6 + + // D3DDevice_AddRef+0x0C : mov [eax+0x04FC], ecx + { 0x0C, 0x89 }, // (Offset,Value)-Pair #7 + { 0x0D, 0x88 }, // (Offset,Value)-Pair #8 + { 0x0E, 0xFC }, // (Offset,Value)-Pair #9 + { 0x0F, 0x04 }, // (Offset,Value)-Pair #10 +OOVPA_END; + +// ****************************************************************** +// * D3DDevice_InsertCallback +// ****************************************************************** +OOVPA_NO_XREF(D3DDevice_InsertCallback, 5028, 7) + + { 0x0C, 0x72 }, + { 0x1A, 0x10 }, + { 0x28, 0x85 }, + { 0x36, 0xC7 }, + { 0x44, 0x0C }, + { 0x52, 0x00 }, + { 0x60, 0x00 }, +OOVPA_END; + // ****************************************************************** // * D3D8_5028 // ****************************************************************** OOVPATable D3D8_5028[] = { - REGISTER_OOVPA(Direct3D_CreateDevice, 4627, PATCH), - REGISTER_OOVPA(Direct3D_CreateDevice, 4627, ALIAS, D3D_CreateDeviceX), + REGISTER_OOVPA(Direct3D_CreateDevice, 5028, PATCH), REGISTER_OOVPA(D3D_CheckDeviceFormat, 4361, DISABLED), REGISTER_OOVPA(D3DDevice_BeginVisibilityTest, 4627, PATCH), REGISTER_OOVPA(D3DDevice_GetCreationParameters, 4034, PATCH), REGISTER_OOVPA(D3DDevice_EndVisibilityTest, 4627, PATCH), REGISTER_OOVPA(D3DDevice_GetVisibilityTestResult, 3925, PATCH), - REGISTER_OOVPA(D3D_KickOffAndWaitForIdle, 4627, PATCH), - REGISTER_OOVPA(D3D_KickOffAndWaitForIdle2, 4627, PATCH), + REGISTER_OOVPA(D3D_KickOffAndWaitForIdle, 5028, PATCH), REGISTER_OOVPA(D3DDevice_BeginPush, 4627, PATCH), REGISTER_OOVPA(D3DDevice_EndPush, 4627, PATCH), REGISTER_OOVPA(D3DDevice_CopyRects, 4627, PATCH), REGISTER_OOVPA(D3DDevice_GetGammaRamp, 4034, PATCH), - REGISTER_OOVPA(D3DDevice_GetBackBuffer2, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_GetBackBuffer2, 4627, ALIAS, D3DDevice_GetBackBuffer2B), - REGISTER_OOVPA(D3DDevice_SetViewport, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_GetBackBuffer2, 5028, PATCH), + REGISTER_OOVPA(D3DDevice_SetViewport, 5028, PATCH), REGISTER_OOVPA(D3D_CommonSetRenderTarget, 4627, XREF), REGISTER_OOVPA(D3D_CommonSetRenderTargetB, 4627, XREF), REGISTER_OOVPA(D3DDevice_SetRenderTarget, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_AddRef, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_AddRef, 5028, PATCH), REGISTER_OOVPA(D3DDevice_SetGammaRamp, 4928, PATCH), - REGISTER_OOVPA(D3DDevice_SetShaderConstantMode, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_GetRenderTarget2, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_GetRenderTarget2, 4627, ALIAS, D3DDevice_GetRenderTarget2B), - REGISTER_OOVPA(D3DDevice_GetDepthStencilSurface2, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_GetDepthStencilSurface2, 4627, ALIAS, D3DDevice_GetDepthStencilSurface2B), + REGISTER_OOVPA(D3DDevice_SetShaderConstantMode, 5028, PATCH), + REGISTER_OOVPA(D3DDevice_GetRenderTarget2, 5028, PATCH), + REGISTER_OOVPA(D3DDevice_GetDepthStencilSurface2, 5028, PATCH), REGISTER_OOVPA(D3DDevice_GetTile, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_SetTileNoWait, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_SetTileNoWait, 5028, PATCH), REGISTER_OOVPA(D3DDevice_CreateIndexBuffer2, 4627, PATCH), REGISTER_OOVPA(D3DDevice_CreateVertexShader, 3925, PATCH), REGISTER_OOVPA(D3DDevice_SetPixelShaderConstant, 4134, PATCH), REGISTER_OOVPA(D3DDevice_SetVertexShaderConstant1, 4627, PATCH), REGISTER_OOVPA(D3DDevice_SetVertexShaderConstant4, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_SetVertexShaderConstantNotInline, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_SetVertexShaderConstantNotInline, 5028, PATCH), REGISTER_OOVPA(D3DDevice_DeletePixelShader, 4134, PATCH), REGISTER_OOVPA(D3DDevice_CreatePixelShader, 3925, PATCH), REGISTER_OOVPA(D3DDevice_SetPixelShader, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_CreateTexture2, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_CreateTexture2, 4627, ALIAS, D3DDevice_CreateTexture2B), - REGISTER_OOVPA(D3DDevice_CreateTexture2, 4627, ALIAS, D3DDevice_CreateTexture2C), - REGISTER_OOVPA(D3DDevice_SetIndices, 4361, PATCH), - REGISTER_OOVPA(D3DDevice_SetIndices, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_SetTexture, 4361, PATCH), - REGISTER_OOVPA(D3DDevice_SetTexture, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_CreateTexture2, 5028, PATCH), + REGISTER_OOVPA(D3DDevice_SetIndices, 5028, PATCH), REGISTER_OOVPA(D3DDevice_SetTexture, 4928, PATCH), REGISTER_OOVPA(D3DDevice_GetDisplayMode, 4627, PATCH), REGISTER_OOVPA(D3DDevice_RunPushBuffer, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_Begin, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_SetVertexData2f, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_SetVertexData4f, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_Begin, 5028, PATCH), + REGISTER_OOVPA(D3DDevice_SetVertexData2f, 5028, PATCH), REGISTER_OOVPA(D3DDevice_End, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_Clear, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_Clear, 4627, ALIAS, D3DDevice_ClearB), - REGISTER_OOVPA(D3DDevice_Swap, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_Clear, 5028, PATCH), + REGISTER_OOVPA(D3DDevice_Swap, 5028, PATCH), REGISTER_OOVPA(D3DDevice_EnableOverlay, 4361, PATCH), REGISTER_OOVPA(D3DDevice_CreateVertexBuffer2, 4627, PATCH), REGISTER_OOVPA(D3DDevice_UpdateOverlay, 4627, PATCH), REGISTER_OOVPA(D3DDevice_GetOverlayUpdateStatus, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_BlockUntilVerticalBlank, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_BlockUntilVerticalBlank, 5028, PATCH), REGISTER_OOVPA(D3DDevice_SetVerticalBlankCallback, 4627, PATCH), REGISTER_OOVPA(D3DDevice_GetViewport, 4627, PATCH), REGISTER_OOVPA(D3DDevice_SetTextureState_TexCoordIndex, 4627, PATCH), @@ -103,26 +696,22 @@ OOVPATable D3D8_5028[] = { REGISTER_OOVPA(D3DDevice_SetTextureState_BorderColor, 4361, PATCH), REGISTER_OOVPA(D3DDevice_SetTextureState_ColorKeyColor, 4134, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_VertexBlend, 4361, PATCH), -REGISTER_OOVPA(D3DDevice_SetRenderState_CullMode, 4034, PATCH), + REGISTER_OOVPA(D3DDevice_SetRenderState_CullMode, 4034, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_NormalizeNormals, 4432, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_NormalizeNormals, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_SetRenderState_TextureFactor, 4361, PATCH), + REGISTER_OOVPA(D3DDevice_SetRenderState_TextureFactor, 5028, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_ZBias, 3925, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_EdgeAntiAlias, 4361, PATCH), - REGISTER_OOVPA(D3DDevice_SetRenderState_EdgeAntiAlias, 4627, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_FillMode, 4361, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_BackFillMode, 4134, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_FogColor, 4134, PATCH), - REGISTER_OOVPA(D3DDevice_SetRenderState_Dxt1NoiseEnable, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_SetRenderState_Dxt1NoiseEnable, 5028, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_Simple, 4361, PATCH), - REGISTER_OOVPA(D3DDevice_SetRenderState_ZEnable, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_SetRenderState_ZEnable, 4627, ALIAS, D3DDevice_SetRenderState_ZEnableB), + REGISTER_OOVPA(D3DDevice_SetRenderState_ZEnable, 5028, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_StencilEnable, 4361, PATCH), - REGISTER_OOVPA(D3DDevice_SetRenderState_StencilEnable, 4627, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_LineWidth, 4627, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_OcclusionCullEnable, 4134, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_MultiSampleAntiAlias, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_SetRenderState_MultiSampleAntiAlias, 4627, ALIAS, D3DDevice_SetRenderState_MultiSampleAntiAliasB), REGISTER_OOVPA(D3DDevice_SetRenderState_ShadowFunc, 4134, PATCH), REGISTER_OOVPA(D3DDevice_SwitchTexture, 4361, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_YuvEnable, 4134, PATCH), @@ -130,34 +719,25 @@ REGISTER_OOVPA(D3DDevice_SetRenderState_CullMode, 4034, PATCH), REGISTER_OOVPA(D3DDevice_GetTransform, 4361, PATCH), REGISTER_OOVPA(D3DDevice_GetStreamSource2, 4627, PATCH), REGISTER_OOVPA(D3DDevice_SetStreamSource, 4361, PATCH), - REGISTER_OOVPA(D3DDevice_SetVertexShader, 4361, PATCH), - REGISTER_OOVPA(D3DDevice_SetVertexShader, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_DrawVertices, 4361, PATCH), REGISTER_OOVPA(D3DDevice_DrawVerticesUP, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_DrawVerticesUP, 4627, ALIAS, D3DDevice_DrawVerticesUPB), - REGISTER_OOVPA(D3DDevice_SetLight, 4361, PATCH), - REGISTER_OOVPA(D3DDevice_DrawIndexedVertices, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_SetVertexShader, 5028, PATCH), + REGISTER_OOVPA(D3DDevice_DrawVertices, 5028, PATCH), + REGISTER_OOVPA(D3DDevice_SetLight, 5028, PATCH), + REGISTER_OOVPA(D3DDevice_DrawIndexedVertices, 5028, PATCH), REGISTER_OOVPA(D3DDevice_SetMaterial, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_LightEnable, 4361, PATCH), + REGISTER_OOVPA(D3DDevice_LightEnable, 5028, PATCH), REGISTER_OOVPA(D3DVertexBuffer_Lock2, 4627, PATCH), - REGISTER_OOVPA(D3DVertexBuffer_Lock2, 4627, ALIAS, D3DVertexBuffer_Lock2B), REGISTER_OOVPA(D3DResource_Register, 3925, PATCH), REGISTER_OOVPA(D3DResource_AddRef, 3925, PATCH), REGISTER_OOVPA(D3DResource_Release, 3925, PATCH), - REGISTER_OOVPA(D3DResource_Release, 4627, PATCH), REGISTER_OOVPA(D3DResource_IsBusy, 4361, PATCH), // REGISTER_OOVPA(D3DResource_GetType, 4627, DISABLED), // I forget why I had this in here... - REGISTER_OOVPA(Get2DSurfaceDesc, 4627, PATCH), - REGISTER_OOVPA(Get2DSurfaceDescB, 4627, XREF), - REGISTER_OOVPA(Get2DSurfaceDesc, 4627, ALIAS, Get2DSurfaceDescC), - REGISTER_OOVPA(Get2DSurfaceDescD, 4627, PATCH), + REGISTER_OOVPA(Get2DSurfaceDesc, 5028, PATCH), REGISTER_OOVPA(D3DSurface_GetDesc, 4361, PATCH), REGISTER_OOVPA(D3DSurface_LockRect, 3925, PATCH), - REGISTER_OOVPA(D3DSurface_LockRect, 4627, PATCH), REGISTER_OOVPA(D3DBaseTexture_GetLevelCount, 4361, PATCH), REGISTER_OOVPA(D3DTexture_GetSurfaceLevel2, 4627, PATCH), - REGISTER_OOVPA(D3DTexture_GetSurfaceLevel2, 4627, ALIAS, D3DTexture_GetSurfaceLevel2B), - REGISTER_OOVPA(D3DTexture_LockRect, 3925, PATCH), + REGISTER_OOVPA(D3DTexture_LockRect, 5028, PATCH), REGISTER_OOVPA(D3DVolumeTexture_LockBox, 4627, PATCH), REGISTER_OOVPA(D3DDevice_GetViewportOffsetAndScale, 4627, PATCH), REGISTER_OOVPA(D3DDevice_DeleteVertexShader, 3925, PATCH), @@ -168,7 +748,7 @@ REGISTER_OOVPA(D3DDevice_SetRenderState_CullMode, 4034, PATCH), REGISTER_OOVPA(D3DDevice_SetVertexShaderInputDirect, 4627, PATCH), REGISTER_OOVPA(D3DDevice_GetVertexShaderInput, 4627, PATCH), REGISTER_OOVPA(D3DDevice_RunVertexStateShader, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_LoadVertexShader, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_LoadVertexShader, 5028, PATCH), REGISTER_OOVPA(D3DDevice_LoadVertexShaderProgram, 4627, PATCH), REGISTER_OOVPA(D3DDevice_SelectVertexShader, 4627, PATCH), REGISTER_OOVPA(D3DDevice_GetVertexShaderSize, 3925, PATCH), @@ -190,14 +770,14 @@ REGISTER_OOVPA(D3DDevice_SetRenderState_CullMode, 4034, PATCH), REGISTER_OOVPA(D3DDevice_GetDisplayFieldStatus, 4627, PATCH), REGISTER_OOVPA(D3DDevice_SetScreenSpaceOffset, 4134, PATCH), REGISTER_OOVPA(D3DDevice_CreateStateBlock, 4627, PATCH), - REGISTER_OOVPA(D3DDevice_InsertCallback, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_InsertCallback, 5028, PATCH), REGISTER_OOVPA(D3DDevice_DrawRectPatch, 4627, PATCH), REGISTER_OOVPA(D3DDevice_GetProjectionViewportMatrix, 4627, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_BackFillMode, 4531, PATCH), REGISTER_OOVPA(D3DDevice_GetDeviceCaps, 3925, DISABLED), - REGISTER_OOVPA(D3DDevice_SetRenderState_MultiSampleMask, 4627, PATCH), + REGISTER_OOVPA(D3DDevice_SetRenderState_MultiSampleMask, 5028, PATCH), REGISTER_OOVPA(D3DDevice_SetRenderState_LogicOp, 4627, PATCH), - REGISTER_OOVPA(D3D_SetFence, 4134, XREF), + REGISTER_OOVPA(D3D_SetFence, 5028, XREF), REGISTER_OOVPA(D3DDevice_InsertFence, 4627, PATCH), REGISTER_OOVPA(D3DDevice_KickOff, 4627, PATCH), REGISTER_OOVPA(D3DDevice_SetPixelShaderConstant, 4928, PATCH), @@ -224,7 +804,7 @@ REGISTER_OOVPA(D3DDevice_SetRenderState_CullMode, 4034, PATCH), REGISTER_OOVPA(D3DDevice_DeleteStateBlock, 4627, PATCH), REGISTER_OOVPA(D3DDevice_SetVertexData4ub, 4361, PATCH), REGISTER_OOVPA(D3DDevice_SetVertexData4f, 4134, PATCH), - REGISTER_OOVPA(D3D_BlockOnTime, 4627, XREF), + REGISTER_OOVPA(D3D_BlockOnTime, 5028, XREF), REGISTER_OOVPA(D3DDevice_BlockOnFence, 4627, PATCH), REGISTER_OOVPA(Lock3DSurface, 4627, PATCH), REGISTER_OOVPA(Lock2DSurface, 3925, PATCH), @@ -245,8 +825,13 @@ REGISTER_OOVPA(D3DDevice_SetRenderState_CullMode, 4034, PATCH), REGISTER_OOVPA(D3DDevice_KickOff, 4627, ALIAS, D3DDevice_KickPushBuffer), REGISTER_OOVPA(D3DDevice_GetBackMaterial, 4627, PATCH), REGISTER_OOVPA(D3DDevice_SetBackMaterial, 4627, PATCH), - // REGISTER_OOVPA(D3DCubeTexture_LockRect, 3925, PATCH), // TODO: This needs to be verified on 4361, not just 4242! REGISTER_OOVPA(D3D_SetPushBufferSize, 4034, DISABLED), + REGISTER_OOVPA(D3DDevice_SetRenderState_SampleAlpha, 5028, PATCH), + REGISTER_OOVPA(D3DDevice_SetRenderState_PSTextureModes, 4361, PATCH), + REGISTER_OOVPA(D3D_GetDeviceCaps, 5028, PATCH), + REGISTER_OOVPA(D3DDevice_SetVertexDataColor, 4361, PATCH), + REGISTER_OOVPA(D3DDevice_GetModelView, 4134, PATCH), + REGISTER_OOVPA(D3DDevice_FlushVertexCache, 4134, PATCH), }; // ****************************************************************** diff --git a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5233.inl b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5233.inl index 559352bf5..ed16cece6 100644 --- a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5233.inl +++ b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5233.inl @@ -35,24 +35,7 @@ // ****************************************************************** // * Direct3D_CreateDevice // ****************************************************************** -OOVPA_NO_XREF(Direct3D_CreateDevice, 5233, 8) - - // Direct3D_CreateDevice+0x0A : jnz +0x0A - { 0x0A, 0x75 }, // (Offset,Value)-Pair #1 - { 0x0B, 0x0A }, // (Offset,Value)-Pair #2 - - // Direct3D_CreateDevice+0x80 : repe stosd - { 0x80, 0xF3 }, // (Offset,Value)-Pair #3 - { 0x81, 0xAB }, // (Offset,Value)-Pair #4 - - // Direct3D_CreateDevice+0x83 : mov eax, esi - { 0x83, 0x8B }, // (Offset,Value)-Pair #5 - { 0x84, 0xC6 }, // (Offset,Value)-Pair #6 - - // Direct3D_CreateDevice+0x91 : retn 0x18 - { 0x91, 0xC2 }, // (Offset,Value)-Pair #7 - { 0x92, 0x18 }, // (Offset,Value)-Pair #8 -OOVPA_END; +#define Direct3D_CreateDevice_5233 Direct3D_CreateDevice_5028 // ****************************************************************** // * D3DDevice_GetDisplayFieldStatus @@ -236,40 +219,12 @@ OOVPA_END; // ****************************************************************** // * D3DDevice_SetRenderState_TextureFactor // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_SetRenderState_TextureFactor, 5233, 9) - - // D3DDevice_SetRenderState_TextureFactor+0x07 : mov eax, [esi+0x036C] - { 0x07, 0x8B }, // (Offset,Value)-Pair #1 - { 0x08, 0x86 }, // (Offset,Value)-Pair #2 - { 0x09, 0x6C }, // (Offset,Value)-Pair #3 - { 0x0A, 0x03 }, // (Offset,Value)-Pair #4 - - // D3DDevice_SetRenderState_TextureFactor+0x2F : nop - { 0x2F, 0x90 }, // (Offset,Value)-Pair #5 - - // D3DDevice_SetRenderState_TextureFactor+0x41 : retn 0x04 - { 0x41, 0xC2 }, // (Offset,Value)-Pair #6 - { 0x42, 0x04 }, // (Offset,Value)-Pair #7 - - // D3DDevice_SetRenderState_TextureFactor+0x4E : retn 0x04 - { 0x4E, 0xC2 }, // (Offset,Value)-Pair #8 - { 0x4F, 0x04 }, // (Offset,Value)-Pair #9 -OOVPA_END; +#define D3DDevice_SetRenderState_TextureFactor_5233 D3DDevice_SetRenderState_TextureFactor_5028 // ****************************************************************** // * D3DDevice_SetRenderState_ZEnable // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_SetRenderState_ZEnable, 5233, 8) - - { 0x13, 0x8B }, - { 0x22, 0xC9 }, - { 0x34, 0x89 }, - { 0x46, 0x0C }, - { 0x5A, 0x74 }, - { 0x6D, 0x8B }, - { 0x7C, 0xCE }, - { 0x8E, 0x00 }, -OOVPA_END; +#define D3DDevice_SetRenderState_ZEnable_5233 D3DDevice_SetRenderState_ZEnable_5028 // ****************************************************************** // * D3DDevice_SetIndices @@ -375,16 +330,7 @@ OOVPA_END; // ****************************************************************** // * D3DTexture_LockRect // ****************************************************************** -OOVPA_NO_XREF(D3DTexture_LockRect, 5233, 7) - - { 0x03, 0x14 }, - { 0x08, 0x8B }, - { 0x0D, 0x8B }, - { 0x12, 0x8B }, - { 0x17, 0x50 }, - { 0x20, 0xC2 }, - { 0x21, 0x14 }, -OOVPA_END; +#define D3DTexture_LockRect_5233 D3DTexture_LockRect_5028 // ****************************************************************** // * Get2DSurfaceDesc @@ -411,28 +357,7 @@ OOVPA_END; // ****************************************************************** // * D3DDevice_GetBackBuffer2 // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_GetBackBuffer2, 5233, 12) - - // D3DDevice_GetBackBuffer2+0x04 : cmp eax, 0xFFFFFFFF - { 0x04, 0x83 }, // (Offset,Value)-Pair #1 - { 0x05, 0xF8 }, // (Offset,Value)-Pair #2 - { 0x06, 0xFF }, // (Offset,Value)-Pair #3 - - // D3DDevice_GetBackBuffer+0x0D : jnz +0x19 - { 0x0D, 0x75 }, // (Offset,Value)-Pair #4 - { 0x0E, 0x19 }, // (Offset,Value)-Pair #5 - - // D3DDevice_GetBackBuffer+0x15 : mov esi, [ecx+eax*4+0x15C0] - { 0x15, 0x8B }, // (Offset,Value)-Pair #6 - { 0x16, 0xB4 }, // (Offset,Value)-Pair #7 - { 0x17, 0x81 }, // (Offset,Value)-Pair #8 - { 0x18, 0xC0 }, // (Offset,Value)-Pair #9 - { 0x19, 0x15 }, // (Offset,Value)-Pair #10 - - // D3DDevice_GetBackBuffer+0x40 : retn 0x04 - { 0x40, 0xC2 }, // (Offset,Value)-Pair #11 - { 0x41, 0x04 }, // (Offset,Value)-Pair #12 -OOVPA_END; +#define D3DDevice_GetBackBuffer2_5233 D3DDevice_GetBackBuffer2_5028 // ****************************************************************** // * D3DDevice_UpdateOverlay @@ -539,30 +464,12 @@ OOVPA_END; // ****************************************************************** // * D3DDevice_GetDepthStencilSurface2 // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_GetDepthStencilSurface2, 5233, 7) - - { 0x05, 0x56 }, - { 0x06, 0x8B }, - { 0x0A, 0x00 }, - { 0x0E, 0x75 }, - { 0x12, 0x5E }, - { 0x1A, 0x8B }, - { 0x1B, 0xC6 }, -OOVPA_END; +#define D3DDevice_GetDepthStencilSurface2_5233 D3DDevice_GetDepthStencilSurface2_5028 // ****************************************************************** // * D3D_GetDeviceCaps // ****************************************************************** -OOVPA_NO_XREF(D3D_GetDeviceCaps, 5233, 7) - - { 0x04, 0x85 }, - { 0x0A, 0x08 }, - { 0x10, 0x83 }, - { 0x16, 0x08 }, - { 0x1C, 0xC2 }, - { 0x22, 0x0C }, - { 0x29, 0x33 }, -OOVPA_END; +#define D3D_GetDeviceCaps_5233 D3D_GetDeviceCaps_5028 // ****************************************************************** // * D3DDevice_DrawVertices @@ -581,57 +488,12 @@ OOVPA_END; // ****************************************************************** // * D3DDevice_SetLight // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_SetLight, 5233, 12) - - // D3DDevice_SetLight+0x11 : mov edi, [ebp+0x390] - { 0x11, 0x8B }, // (Offset,Value)-Pair #1 - { 0x12, 0xBD }, // (Offset,Value)-Pair #2 - { 0x13, 0x90 }, // (Offset,Value)-Pair #3 - { 0x14, 0x03 }, // (Offset,Value)-Pair #4 - - // D3DDevice_SetLight+0x30 : shl eax, 0x04 - { 0x30, 0xC1 }, // (Offset,Value)-Pair #5 - { 0x31, 0xE0 }, // (Offset,Value)-Pair #6 - { 0x32, 0x04 }, // (Offset,Value)-Pair #7 - - // D3DDevice_SetLight+0xBD : rep stosb - { 0xBD, 0xF3 }, // (Offset,Value)-Pair #8 - { 0xBE, 0xAB }, // (Offset,Value)-Pair #9 - - // D3DDevice_SetLight+0xFD : mov ecx, [ebx+0x68] - { 0xFD, 0x8B }, // (Offset,Value)-Pair #10 - { 0xFE, 0x4B }, // (Offset,Value)-Pair #11 - { 0xFF, 0x68 }, // (Offset,Value)-Pair #12 -OOVPA_END; +#define D3DDevice_SetLight_5233 D3DDevice_SetLight_5028 // ****************************************************************** // * D3DDevice_LightEnable // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_LightEnable, 5233, 13) - - // D3DDevice_LightEnable+0x0F : cmp ebx, [esi+0x0390] - { 0x0F, 0x3B }, // (Offset,Value)-Pair #1 - { 0x10, 0x9E }, // (Offset,Value)-Pair #2 - { 0x11, 0x90 }, // (Offset,Value)-Pair #3 - { 0x12, 0x03 }, // (Offset,Value)-Pair #4 - - // D3DDevice_LightEnable+0x6B : test eax, eax - { 0x6B, 0x85 }, // (Offset,Value)-Pair #5 - { 0x6C, 0xC0 }, // (Offset,Value)-Pair #6 - - // D3DDevice_LightEnable+0x9E : mov eax, [eax+0x8C] - { 0x9E, 0x8B }, // (Offset,Value)-Pair #7 - { 0x9F, 0x80 }, // (Offset,Value)-Pair #8 - { 0xA0, 0x8C }, // (Offset,Value)-Pair #9 - - // D3DDevice_LightEnable+0xBC : jz +0x12 - { 0xBC, 0x74 }, // (Offset,Value)-Pair #10 - { 0xBD, 0x12 }, // (Offset,Value)-Pair #11 - - // D3DDevice_LightEnable+0xE1 : retn 0x08 - { 0xE1, 0xC2 }, // (Offset,Value)-Pair #12 - { 0xE2, 0x08 }, // (Offset,Value)-Pair #13 -OOVPA_END; +#define D3DDevice_LightEnable_5233 D3DDevice_LightEnable_5028 // ****************************************************************** // * D3DVertexBuffer_GetDesc @@ -678,49 +540,12 @@ OOVPA_END; // ****************************************************************** // * D3DDevice_SetTileNoWait // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_SetTileNoWait, 5233, 11) - - // D3DDevice_SetTileNoWait+0x06 : sub esp, 0x18 - { 0x06, 0x83 }, // (Offset,Value)-Pair #1 - { 0x07, 0xEC }, // (Offset,Value)-Pair #2 - { 0x08, 0x18 }, // (Offset,Value)-Pair #3 - - // D3DDevice_SetTileNoWait+0x15 : cmp [esi+4], eax - { 0x15, 0x39 }, // (Offset,Value)-Pair #4 - { 0x16, 0x46 }, // (Offset,Value)-Pair #5 - { 0x17, 0x04 }, // (Offset,Value)-Pair #6 - - // D3DDevice_SetTileNoWait+0x3D : lea edi, [edx+ecx*8+0x1660] - { 0x3D, 0x8D }, // (Offset,Value)-Pair #7 - { 0x3E, 0xBC }, // (Offset,Value)-Pair #8 - { 0x3F, 0xCA }, // (Offset,Value)-Pair #9 - { 0x40, 0x60 }, // (Offset,Value)-Pair #10 - { 0x41, 0x16 }, // (Offset,Value)-Pair #11 -OOVPA_END; +#define D3DDevice_SetTileNoWait_5233 D3DDevice_SetTileNoWait_5028 // ****************************************************************** // * D3DDevice_AddRef // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_AddRef, 5233, 10) - - // D3DDevice_AddRef+0x00 : mov eax, [addr] - { 0x00, 0xA1 }, // (Offset,Value)-Pair #1 - - // D3DDevice_AddRef+0x05 : mov ecx, [eax+0x04FC] - { 0x05, 0x8B }, // (Offset,Value)-Pair #2 - { 0x06, 0x88 }, // (Offset,Value)-Pair #3 - { 0x07, 0xFC }, // (Offset,Value)-Pair #4 - { 0x08, 0x04 }, // (Offset,Value)-Pair #5 - - // D3DDevice_AddRef+0x0B : inc ecx - { 0x0B, 0x41 }, // (Offset,Value)-Pair #6 - - // D3DDevice_AddRef+0x0C : mov [eax+0x04FC], ecx - { 0x0C, 0x89 }, // (Offset,Value)-Pair #7 - { 0x0D, 0x88 }, // (Offset,Value)-Pair #8 - { 0x0E, 0xFC }, // (Offset,Value)-Pair #9 - { 0x0F, 0x04 }, // (Offset,Value)-Pair #10 -OOVPA_END; +#define D3DDevice_AddRef_5233 D3DDevice_AddRef_5028 // ****************************************************************** // * IDirectD3DDevice8_Release @@ -885,19 +710,7 @@ OOVPA_END; // ****************************************************************** // * D3D::SetFence // ****************************************************************** -OOVPA_XREF(D3D_SetFence, 5233, 7, - - XREF_D3D_SETFENCE, - XRefZero) - - { 0x0E, 0x05 }, - { 0x18, 0xC9 }, - { 0x3E, 0x3F }, - { 0x5E, 0x28 }, - { 0x86, 0x5D }, - { 0x98, 0xE8 }, - { 0xA2, 0x04 }, -OOVPA_END; +#define D3D_SetFence_5233 D3D_SetFence_5028 // ****************************************************************** // * D3DDevice_InsertFence diff --git a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5344.inl b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5344.inl index 62fe55201..e98f4db96 100644 --- a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5344.inl +++ b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5344.inl @@ -632,16 +632,7 @@ OOVPA_END; // ****************************************************************** // * D3DDevice_BlockUntilVerticalBlank // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_BlockUntilVerticalBlank, 5344, 7) - - { 0x05, 0x6A }, - { 0x12, 0x00 }, - { 0x15, 0x6A }, - { 0x16, 0x06 }, - { 0x17, 0x05 }, - { 0x1C, 0x50 }, - { 0x23, 0xC3 }, -OOVPA_END; +#define D3DDevice_BlockUntilVerticalBlank_5344 D3DDevice_BlockUntilVerticalBlank_5028 // ****************************************************************** // * D3DDevice_PersistDisplay @@ -660,18 +651,7 @@ OOVPA_END; // ****************************************************************** // * D3DDevice_SetVertexShaderConstantNotInline // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_SetVertexShaderConstantNotInline, 5344, 9) - - { 0x0B, 0x10 }, - { 0x10, 0x75 }, - { 0x11, 0x15 }, - { 0x12, 0x56 }, - { 0x13, 0x57 }, - { 0x14, 0x8B }, - { 0x1A, 0xC7 }, - { 0x31, 0xC2 }, - { 0x32, 0x04 }, -OOVPA_END; +#define D3DDevice_SetVertexShaderConstantNotInline_5344 D3DDevice_SetVertexShaderConstantNotInline_5028 // ****************************************************************** // * D3DDevice_DeleteVertexShader diff --git a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5558.inl b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5558.inl index a5726a0ac..f9aea1bce 100644 --- a/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5558.inl +++ b/src/CxbxKrnl/HLEDataBase/D3D8.1.0.5558.inl @@ -846,16 +846,7 @@ OOVPA_END; // ****************************************************************** // * D3DDevice_GetModelView // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_GetModelView, 5558, 7) - - { 0x05, 0x57 }, - { 0x0A, 0x85 }, - { 0x10, 0xB0 }, - { 0x16, 0x10 }, - { 0x1C, 0x5E }, - { 0x22, 0xC1 }, - { 0x28, 0xE0 }, -OOVPA_END; +#define D3DDevice_GetModelView_5558 D3DDevice_GetModelView_4134 // ****************************************************************** // * D3DDevice_SetBackMaterial @@ -1113,16 +1104,7 @@ OOVPA_END; // ****************************************************************** // * D3DDevice_InsertCallback // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_InsertCallback, 5558, 7) - - { 0x0C, 0x72 }, - { 0x1A, 0x10 }, - { 0x28, 0x85 }, - { 0x36, 0xC7 }, - { 0x44, 0x0C }, - { 0x52, 0x00 }, - { 0x60, 0x00 }, -OOVPA_END; +#define D3DDevice_InsertCallback_5558 D3DDevice_InsertCallback_5028 // ****************************************************************** // * D3DDevice_SetRenderState_LineWidth @@ -1157,19 +1139,7 @@ OOVPA_END; // ****************************************************************** // * D3DDevice_FlushVertexCache // ****************************************************************** -OOVPA_NO_XREF(D3DDevice_FlushVertexCache, 5558, 10) - - { 0x00, 0x56 }, - { 0x07, 0x8B }, - { 0x08, 0x06 }, - { 0x0D, 0x05 }, - { 0x13, 0xC7 }, - { 0x15, 0x10 }, - { 0x17, 0x04 }, - { 0x1C, 0x00 }, - { 0x21, 0xC0 }, - { 0x26, 0xC3 }, -OOVPA_END; +#define D3DDevice_FlushVertexCache_5558 D3DDevice_FlushVertexCache_4134 // ****************************************************************** // * D3DDevice_SetRenderState_LogicOp