diff --git a/Cxbx.opt b/Cxbx.opt index 052913b06..76c92f5b5 100644 Binary files a/Cxbx.opt and b/Cxbx.opt differ diff --git a/CxbxKrnl.dsp b/CxbxKrnl.dsp index 37f4f414c..fddf1e3cc 100644 --- a/CxbxKrnl.dsp +++ b/CxbxKrnl.dsp @@ -189,6 +189,10 @@ SOURCE=.\Include\Win32\CxbxKrnl\HLEDataBase\Xapi.1.0.4361.h # End Source File # Begin Source File +SOURCE=.\Include\Win32\CxbxKrnl\HLEDataBase\Xapi.1.0.4432.h +# End Source File +# Begin Source File + SOURCE=.\Include\Win32\CxbxKrnl\HLEDataBase\Xapi.1.0.4627.h # End Source File # Begin Source File @@ -330,236 +334,97 @@ SOURCE=.\Resource\CxbxDll.rc # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\D3D8.1.0.3925.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\D3D8.1.0.4034.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\D3D8.1.0.4134.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\D3D8.1.0.4361.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\D3D8.1.0.4432.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\D3D8.1.0.4627.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\DSound.1.0.3936.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\DSound.1.0.4361.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\DSound.1.0.4627.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\Xapi.1.0.3911.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\Xapi.1.0.4034.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\Xapi.1.0.4134.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\Xapi.1.0.4361.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 +# End Source File +# Begin Source File -!ENDIF - +SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\Xapi.1.0.4432.inl +# PROP Exclude_From_Build 1 # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\Xapi.1.0.4627.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\XG.1.0.4361.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\XG.1.0.4627.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\XNet.1.0.3911.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\Source\Win32\CxbxKrnl\HLEDataBase\XOnline.1.0.4361.inl - -!IF "$(CFG)" == "CxbxKrnl - Win32 Release" - -!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" - # PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # End Group # Begin Source File diff --git a/Doc/Todo.txt b/Doc/Todo.txt index 1a27fcb47..1a99d2c35 100644 --- a/Doc/Todo.txt +++ b/Doc/Todo.txt @@ -1,5 +1,12 @@ Cxbx Todo (* denotes high priority, + denotes medium priority) +HLE : + + * Direct3D_SetPushBufferSize for Antz Extreme Racing (4361). Do this + when Xiggen is stabilized! For now, safe to ignore it. + +ETC : + * Use SetAllParameters to reverse engineer 3911 DSound functions * Stella has a memory leak in the game's list screen.. diff --git a/Include/Win32/CxbxKrnl/EmuD3D8.h b/Include/Win32/CxbxKrnl/EmuD3D8.h index 64bb310a4..80e3c37c1 100644 --- a/Include/Win32/CxbxKrnl/EmuD3D8.h +++ b/Include/Win32/CxbxKrnl/EmuD3D8.h @@ -1039,6 +1039,14 @@ VOID WINAPI EmuIDirect3DDevice8_SetTextureState_TexCoordIndex DWORD Value ); +// ****************************************************************** +// * func: EmuIDirect3DDevice8_SetTextureState_BackFillMode +// ****************************************************************** +VOID WINAPI EmuIDirect3DDevice8_SetTextureState_BackFillMode +( + DWORD Value +); + // ****************************************************************** // * func: EmuIDirect3DDevice8_SetTextureState_BorderColor // ****************************************************************** diff --git a/Include/Win32/CxbxKrnl/EmuD3D8Conv.h b/Include/Win32/CxbxKrnl/EmuD3D8Conv.h index b1370db2c..99e2b31e1 100644 --- a/Include/Win32/CxbxKrnl/EmuD3D8Conv.h +++ b/Include/Win32/CxbxKrnl/EmuD3D8Conv.h @@ -118,6 +118,9 @@ inline D3DFORMAT EmuXB2PC_D3DFormat(X_D3DFORMAT Format) case 0x2A: // Swizzled (X_D3DFMT_D24S8) return D3DFMT_D24S8; + case 0x2B: // Swizzled (X_D3DFMT_F24S8) + return D3DFMT_D24S8; // NOTE: Hack!! PC does not have D3DFMT_F24S8 (Float vs Int) + case 0x30: // Linear (X_D3DFMT_LIN_D16) case 0x2C: // Swizzled (X_D3DFMT_D16) return D3DFMT_D16; diff --git a/Include/Win32/CxbxKrnl/HLEDataBase.h b/Include/Win32/CxbxKrnl/HLEDataBase.h index 43b90ee22..26b50dcaa 100644 --- a/Include/Win32/CxbxKrnl/HLEDataBase.h +++ b/Include/Win32/CxbxKrnl/HLEDataBase.h @@ -38,6 +38,7 @@ #include "Xapi.1.0.4034.h" #include "Xapi.1.0.4134.h" #include "Xapi.1.0.4361.h" +#include "Xapi.1.0.4432.h" #include "Xapi.1.0.4627.h" #include "D3D8.1.0.3925.h" #include "D3D8.1.0.4034.h" diff --git a/Include/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4432.h b/Include/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4432.h new file mode 100644 index 000000000..4cce01074 --- /dev/null +++ b/Include/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4432.h @@ -0,0 +1,42 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->Xapi.1.0.4432.h +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2002-2003 Aaron Robinson +// * +// * All rights reserved +// * +// ****************************************************************** +#ifndef XAPI_1_0_4432_H +#define XAPI_1_0_4432_H + +#include "OOVPA.h" + +extern OOVPATable XAPI_1_0_4432[]; +extern uint32 XAPI_1_0_4432_SIZE; + +#endif diff --git a/Source/Win32/CxbxKrnl/Emu.cpp b/Source/Win32/CxbxKrnl/Emu.cpp index 980ef7aa6..22e4b2db5 100644 --- a/Source/Win32/CxbxKrnl/Emu.cpp +++ b/Source/Win32/CxbxKrnl/Emu.cpp @@ -536,7 +536,7 @@ extern "C" CXBXKRNL_API void NTAPI EmuInit // _USE_XGMATH Disabled in mesh :[ // halo : dword_0_2E2D18 // halo : 1744F0 (bink) - //_asm int 3 + _asm int 3 Entry(); diff --git a/Source/Win32/CxbxKrnl/EmuD3D8.cpp b/Source/Win32/CxbxKrnl/EmuD3D8.cpp index 5b3c4ca32..3d6e1a161 100644 --- a/Source/Win32/CxbxKrnl/EmuD3D8.cpp +++ b/Source/Win32/CxbxKrnl/EmuD3D8.cpp @@ -1732,7 +1732,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetDepthStencilSurface *ppZStencilSurface = g_pCachedZStencilSurface; #ifdef _DEBUG_TRACE - printf("EmuD3D8 (0x%X): DepthStencilSurface := 0x%.08X\n", pSurface8); + printf("EmuD3D8 (0x%X): DepthStencilSurface := 0x%.08X\n", GetCurrentThreadId(), pSurface8); #endif EmuSwapFS(); // Xbox FS @@ -4868,6 +4868,34 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetTextureState_TexCoordIndex return; } +// ****************************************************************** +// * func: EmuIDirect3DDevice8_SetTextureState_BackFillMode +// ****************************************************************** +VOID WINAPI XTL::EmuIDirect3DDevice8_SetTextureState_BackFillMode +( + DWORD Value +) +{ + EmuSwapFS(); // Win2k/XP FS + + // debug trace + #ifdef _DEBUG_TRACE + { + printf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetTextureState_BackFillMode\n" + "(\n" + " Value : 0x%.08X\n" + ");\n", + GetCurrentThreadId(), Value); + } + #endif + + EmuWarning("BackFillMode is not supported!"); + + EmuSwapFS(); // XBox FS + + return; +} + // ****************************************************************** // * func: EmuIDirect3DDevice8_SetTextureState_BorderColor // ****************************************************************** diff --git a/Source/Win32/CxbxKrnl/HLEDataBase.cpp b/Source/Win32/CxbxKrnl/HLEDataBase.cpp index 24240ed64..72494caf7 100644 --- a/Source/Win32/CxbxKrnl/HLEDataBase.cpp +++ b/Source/Win32/CxbxKrnl/HLEDataBase.cpp @@ -53,6 +53,7 @@ namespace XTL #include "HLEDataBase/Xapi.1.0.4034.inl" #include "HLEDataBase/Xapi.1.0.4134.inl" #include "HLEDataBase/Xapi.1.0.4361.inl" +#include "HLEDataBase/Xapi.1.0.4432.inl" #include "HLEDataBase/Xapi.1.0.4627.inl" #include "HLEDataBase/D3D8.1.0.3925.inl" #include "HLEDataBase/D3D8.1.0.4034.inl" @@ -101,6 +102,13 @@ HLEData HLEDataBase[] = XAPI_1_0_4361, XAPI_1_0_4361_SIZE }, + // Xapilib Version 1.0.4432 + { + "XAPILIB", + 1, 0, 4432, + XAPI_1_0_4432, + XAPI_1_0_4432_SIZE + }, // Xapilib Version 1.0.4627 { "XAPILIB", diff --git a/Source/Win32/CxbxKrnl/HLEDataBase/D3D8.1.0.4432.inl b/Source/Win32/CxbxKrnl/HLEDataBase/D3D8.1.0.4432.inl index dfc75e10c..e97bbd804 100644 --- a/Source/Win32/CxbxKrnl/HLEDataBase/D3D8.1.0.4432.inl +++ b/Source/Win32/CxbxKrnl/HLEDataBase/D3D8.1.0.4432.inl @@ -32,6 +32,141 @@ // * // ****************************************************************** +// ****************************************************************** +// * IDirect3D8_CreateDevice +// ****************************************************************** +SOOVPA<8> IDirect3D8_CreateDevice_1_0_4432 = +{ + 0, // Large == 0 + 8, // Count == 8 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // IDirect3D8_CreateDevice+0x07 : jnz +0x0A + { 0x07, 0x75 }, // (Offset,Value)-Pair #1 + { 0x08, 0x0A }, // (Offset,Value)-Pair #2 + + // IDirect3D8_CreateDevice+0x86 : repe stosd + { 0x86, 0xF3 }, // (Offset,Value)-Pair #3 + { 0x87, 0xAB }, // (Offset,Value)-Pair #4 + + // IDirect3D8_CreateDevice+0x89 : mov eax, esi + { 0x89, 0x8B }, // (Offset,Value)-Pair #5 + { 0x8A, 0xC6 }, // (Offset,Value)-Pair #6 + + // IDirect3D8_CreateDevice+0xA0 : retn 0x18 + { 0xA0, 0xC2 }, // (Offset,Value)-Pair #7 + { 0xA1, 0x18 }, // (Offset,Value)-Pair #8 + } +}; + +// ****************************************************************** +// * IDirect3DDevice8_GetRenderTarget +// ****************************************************************** +SOOVPA<11> IDirect3DDevice8_GetRenderTarget_1_0_4432 = +{ + 0, // Large == 0 + 11, // Count == 11 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // IDirect3DDevice8_GetRenderTarget+0x00 : mov eax, [addr] + { 0x00, 0xA1 }, // (Offset,Value)-Pair #1 + + // IDirect3DDevice8_GetRenderTarget+0x05 : mov eax, [eax + 0x2070] + { 0x05, 0x8B }, // (Offset,Value)-Pair #2 + { 0x06, 0x80 }, // (Offset,Value)-Pair #3 + { 0x07, 0x70 }, // (Offset,Value)-Pair #4 + { 0x08, 0x20 }, // (Offset,Value)-Pair #5 + + // IDirect3DDevice8_GetRenderTarget+0x15 : push eax + { 0x15, 0x50 }, // (Offset,Value)-Pair #6 + + // IDirect3DDevice8_GetRenderTarget+0x13 : jz + 0x06 + { 0x13, 0x74 }, // (Offset,Value)-Pair #7 + { 0x14, 0x06 }, // (Offset,Value)-Pair #8 + + // IDirect3DDevice8_GetRenderTarget+0x16 : call [addr] + { 0x16, 0xE8 }, // (Offset,Value)-Pair #9 + + // IDirect3DDevice8_GetRenderTarget+0x1D : retn 0x04 + { 0x1D, 0xC2 }, // (Offset,Value)-Pair #10 + { 0x1E, 0x04 }, // (Offset,Value)-Pair #11 + } +}; + +// ****************************************************************** +// * IDirect3DDevice8_GetDepthStencilSurface +// ****************************************************************** +SOOVPA<11> IDirect3DDevice8_GetDepthStencilSurface_1_0_4432 = +{ + 0, // Large == 0 + 11, // Count == 11 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // IDirect3DDevice8_GetDepthStencilSurface+0x00 : mov eax, [addr] + { 0x00, 0xA1 }, // (Offset,Value)-Pair #1 + + // IDirect3DDevice8_GetDepthStencilSurface+0x05 : mov eax, [eax + 0x2074] + { 0x05, 0x8B }, // (Offset,Value)-Pair #2 + { 0x06, 0x80 }, // (Offset,Value)-Pair #3 + { 0x07, 0x74 }, // (Offset,Value)-Pair #4 + { 0x08, 0x20 }, // (Offset,Value)-Pair #5 + + // IDirect3DDevice8_GetDepthStencilSurface+0x15 : push eax + { 0x15, 0x50 }, // (Offset,Value)-Pair #6 + + // IDirect3DDevice8_GetDepthStencilSurface+0x13 : jnz +0x0B + { 0x13, 0x74 }, // (Offset,Value)-Pair #7 + { 0x14, 0x0B }, // (Offset,Value)-Pair #8 + + // IDirect3DDevice8_GetDepthStencilSurface+0x16 : call [addr] + { 0x16, 0xE8 }, // (Offset,Value)-Pair #9 + + // IDirect3DDevice8_GetDepthStencilSurface+0x25 : retn 0x04 + { 0x25, 0xC2 }, // (Offset,Value)-Pair #10 + { 0x26, 0x04 }, // (Offset,Value)-Pair #11 + } +}; + +// ****************************************************************** +// * IDirect3DDevice8_SetPixelShader +// ****************************************************************** +SOOVPA<10> IDirect3DDevice8_SetPixelShader_1_0_4432 = +{ + 0, // Large == 0 + 10, // Count == 10 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // IDirect3DDevice8_SetPixelShader+0x22 : or ecx, 0x4800 + { 0x22, 0x81 }, // (Offset,Value)-Pair #1 + { 0x23, 0xC9 }, // (Offset,Value)-Pair #2 + { 0x24, 0x00 }, // (Offset,Value)-Pair #3 + { 0x25, 0x48 }, // (Offset,Value)-Pair #4 + + // IDirect3DDevice8_SetPixelShader+0x3A : or eax, 0x2000 + { 0x3A, 0x0D }, // (Offset,Value)-Pair #5 + { 0x3C, 0x20 }, // (Offset,Value)-Pair #6 + + // IDirect3DDevice8_SetPixelShader+0x78 : retn 0x04 + { 0x78, 0xC2 }, // (Offset,Value)-Pair #7 + { 0x79, 0x04 }, // (Offset,Value)-Pair #8 + + // IDirect3DDevice8_SetPixelShader+0xE3 : rep movsd + { 0xE3, 0xF3 }, // (Offset,Value)-Pair #9 + { 0xE4, 0xA5 }, // (Offset,Value)-Pair #10 + } +}; // ****************************************************************** // * IDirect3DDevice8_SetTextureState_BumpEnv @@ -67,6 +202,41 @@ SOOVPA<12> IDirect3DDevice8_SetTextureState_BumpEnv_1_0_4432 = } }; +// ****************************************************************** +// * IDirect3DDevice8_SetTextureState_BackFillMode +// ****************************************************************** +SOOVPA<13> IDirect3DDevice8_SetTextureState_BackFillMode_1_0_4432 = +{ + 0, // Large == 0 + 13, // Count == 13 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // IDirect3DDevice8_SetTextureState_BackFillMode+0x1C : jb +0x05 + { 0x1C, 0x72 }, // (Offset,Value)-Pair #1 + { 0x1D, 0x05 }, // (Offset,Value)-Pair #2 + + // IDirect3DDevice8_SetTextureState_BackFillMode+0x35 : mov dword ptr [eax], abs + { 0x35, 0xC7 }, // (Offset,Value)-Pair #3 + { 0x36, 0x00 }, // (Offset,Value)-Pair #4 + + // IDirect3DDevice8_SetTextureState_BackFillMode+0x3B : add eax, 0x0C; mov [esi], eax; mov [abs], edi + { 0x41, 0x83 }, // (Offset,Value)-Pair #5 + { 0x42, 0xC0 }, // (Offset,Value)-Pair #6 + { 0x43, 0x0C }, // (Offset,Value)-Pair #7 + { 0x44, 0x89 }, // (Offset,Value)-Pair #8 + { 0x45, 0x06 }, // (Offset,Value)-Pair #9 + { 0x46, 0x89 }, // (Offset,Value)-Pair #10 + { 0x47, 0x3D }, // (Offset,Value)-Pair #11 + + // IDirect3DDevice8_SetTextureState_BackFillMode+0x4E : retn 0x04 + { 0x4E, 0xC2 }, // (Offset,Value)-Pair #12 + { 0x4F, 0x04 }, // (Offset,Value)-Pair #13 + } +}; + // ****************************************************************** // * IDirect3DDevice8_SetTextureState_BorderColor // ****************************************************************** @@ -211,6 +381,16 @@ SOOVPA<13> IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4432 = // ****************************************************************** OOVPATable D3D8_1_0_4432[] = { + // IDirect3D8::CreateDevice + { + (OOVPA*)&IDirect3D8_CreateDevice_1_0_4432, + + XTL::EmuIDirect3D8_CreateDevice, + + #ifdef _DEBUG_TRACE + "EmuIDirect3D8_CreateDevice" + #endif + }, // IDirect3D8::GetAdapterModeCount (* unchanged since 4361 *) { (OOVPA*)&IDirect3D8_GetAdapterModeCount_1_0_4361, @@ -231,6 +411,26 @@ OOVPATable D3D8_1_0_4432[] = "EmuIDirect3D8_EnumAdapterModes" #endif }, + // IDirect3DDevice8::GetRenderTarget + { + (OOVPA*)&IDirect3DDevice8_GetRenderTarget_1_0_4432, + + XTL::EmuIDirect3DDevice8_GetRenderTarget, + + #ifdef _DEBUG_TRACE + "EmuIDirect3DDevice8_GetRenderTarget" + #endif + }, + // IDirect3DDevice8::GetDepthStencilSurface + { + (OOVPA*)&IDirect3DDevice8_GetDepthStencilSurface_1_0_4432, + + XTL::EmuIDirect3DDevice8_GetDepthStencilSurface, + + #ifdef _DEBUG_TRACE + "EmuIDirect3DDevice8_GetDepthStencilSurface" + #endif + }, // IDirect3DDevice8::CreateVertexShader (* unchanged since 3925 *) { (OOVPA*)&IDirect3DDevice8_CreateVertexShader_1_0_3925, @@ -241,6 +441,16 @@ OOVPATable D3D8_1_0_4432[] = "EmuIDirect3DDevice8_CreateVertexShader" #endif }, + // IDirect3DDevice8::SetPixelShader + { + (OOVPA*)&IDirect3DDevice8_SetPixelShader_1_0_4432, + + XTL::EmuIDirect3DDevice8_SetPixelShader, + + #ifdef _DEBUG_TRACE + "EmuIDirect3DDevice8_SetPixelShader" + #endif + }, // IDirect3DDevice8::SetTexture (* unchanged since 4361 *) { (OOVPA*)&IDirect3DDevice8_SetTexture_1_0_4361, @@ -271,6 +481,16 @@ OOVPATable D3D8_1_0_4432[] = "EmuIDirect3DDevice8_SetTextureState_BumpEnv" #endif }, + // IDirect3DDevice8::SetTextureState_BackFillMode + { + (OOVPA*)&IDirect3DDevice8_SetTextureState_BackFillMode_1_0_4432, + + XTL::EmuIDirect3DDevice8_SetTextureState_BackFillMode, + + #ifdef _DEBUG_TRACE + "EmuIDirect3DDevice8_SetTextureState_BackFillMode" + #endif + }, // IDirect3DDevice8::SetTextureState_BorderColor { (OOVPA*)&IDirect3DDevice8_SetTextureState_BorderColor_1_0_4432, @@ -281,6 +501,16 @@ OOVPATable D3D8_1_0_4432[] = "EmuIDirect3DDevice8_SetTextureState_BorderColor" #endif }, + // IDirect3DDevice8::SetRenderState_VertexBlend (* unchanged since 4361 *) + { + (OOVPA*)&IDirect3DDevice8_SetRenderState_VertexBlend_1_0_4361, + + XTL::EmuIDirect3DDevice8_SetRenderState_VertexBlend, + + #ifdef _DEBUG_TRACE + "EmuIDirect3DDevice8_SetRenderState_VertexBlend" + #endif + }, // IDirect3DDevice8::SetRenderState_CullMode (* unchanged since 4134 *) { (OOVPA*)&IDirect3DDevice8_SetRenderState_CullMode_1_0_4134, diff --git a/Source/Win32/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl b/Source/Win32/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl index 893a2418f..a8dfd288c 100644 --- a/Source/Win32/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl +++ b/Source/Win32/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl @@ -1165,105 +1165,6 @@ SOOVPA<10> IDirect3DDevice8_SetTextureState_TexCoordIndex_1_0_4627 = } }; -// ****************************************************************** -// * IDirect3DDevice8_SetTextureState_BumpEnv -// ****************************************************************** -SOOVPA<12> IDirect3DDevice8_SetTextureState_BumpEnv_1_0_4627 = -{ - 0, // Large == 0 - 12, // Count == 12 - - -1, // XRef Not Saved - 0, // XRef Not Used - - { - // IDirect3DDevice8_SetTextureState_BumpEnv+0x18 : jnz +0x03 - { 0x18, 0x75 }, // (Offset,Value)-Pair #1 - { 0x19, 0x03 }, // (Offset,Value)-Pair #2 - - // IDirect3DDevice8_SetTextureState_BumpEnv+0x1D : test bl, 3 - { 0x1D, 0xF6 }, // (Offset,Value)-Pair #3 - { 0x1E, 0xC3 }, // (Offset,Value)-Pair #4 - { 0x1F, 0x03 }, // (Offset,Value)-Pair #5 - - // IDirect3DDevice8_SetTextureState_BumpEnv+0x32 : mov ecx, [esp+0x14] - { 0x32, 0x8B }, // (Offset,Value)-Pair #6 - { 0x33, 0x4C }, // (Offset,Value)-Pair #7 - { 0x34, 0x24 }, // (Offset,Value)-Pair #8 - { 0x35, 0x18 }, // (Offset,Value)-Pair #9 - - // IDirect3DDevice8_SetTextureState_BumpEnv+0x50 : shl esi, 5 - { 0x50, 0xC1 }, // (Offset,Value)-Pair #10 - { 0x51, 0xE6 }, // (Offset,Value)-Pair #11 - { 0x52, 0x05 }, // (Offset,Value)-Pair #12 - } -}; - -// ****************************************************************** -// * IDirect3DDevice8_SetTextureState_BorderColor -// ****************************************************************** -SOOVPA<15> IDirect3DDevice8_SetTextureState_BorderColor_1_0_4627 = -{ - 0, // Large == 0 - 15, // Count == 15 - - -1, // XRef Not Saved - 0, // XRef Not Used - - { - // IDirect3DDevice8_SetTextureState_BorderColor+0x0C : jb +0x05 - { 0x0C, 0x72 }, // (Offset,Value)-Pair #1 - { 0x0D, 0x05 }, // (Offset,Value)-Pair #2 - - // IDirect3DDevice8_SetTextureState_BorderColor+0x19 : shl edx, 6 - { 0x19, 0xC1 }, // (Offset,Value)-Pair #3 - { 0x1A, 0xE2 }, // (Offset,Value)-Pair #4 - { 0x1B, 0x06 }, // (Offset,Value)-Pair #5 - - // IDirect3DDevice8_SetTextureState_BorderColor+0x2B : add eax, 8; mov [esi], eax; shl ecx, 7 - { 0x2B, 0x83 }, // (Offset,Value)-Pair #6 - { 0x2C, 0xC0 }, // (Offset,Value)-Pair #7 - { 0x2D, 0x08 }, // (Offset,Value)-Pair #8 - { 0x2E, 0x89 }, // (Offset,Value)-Pair #9 - { 0x2F, 0x06 }, // (Offset,Value)-Pair #10 - { 0x30, 0xC1 }, // (Offset,Value)-Pair #11 - { 0x31, 0xE1 }, // (Offset,Value)-Pair #12 - { 0x32, 0x07 }, // (Offset,Value)-Pair #13 - - // IDirect3DDevice8_SetTextureState_BorderColor+0x3A : retn 0x08 - { 0x3A, 0xC2 }, // (Offset,Value)-Pair #14 - { 0x3B, 0x08 }, // (Offset,Value)-Pair #15 - } -}; - -// ****************************************************************** -// * IDirect3DDevice8_SetRenderState_NormalizeNormals -// ****************************************************************** -SOOVPA<8> IDirect3DDevice8_SetRenderState_NormalizeNormals_1_0_4627 = -{ - 0, // Large == 0 - 8, // Count == 8 - - -1, // XRef Not Saved - 0, // XRef Not Used - - { - // IDirect3DDevice8_SetRenderState_NormalizeNormals+0x07 : mov eax, [esi] - { 0x07, 0x8B }, // (Offset,Value)-Pair #1 - { 0x08, 0x06 }, // (Offset,Value)-Pair #2 - - // IDirect3DDevice8_SetRenderState_NormalizeNormals+0x25 : or [addr], 0x200 - { 0x25, 0x81 }, // (Offset,Value)-Pair #3 - { 0x26, 0x0D }, // (Offset,Value)-Pair #4 - { 0x2B, 0x00 }, // (Offset,Value)-Pair #5 - { 0x2C, 0x02 }, // (Offset,Value)-Pair #6 - - // IDirect3DDevice8_SetRenderState_NormalizeNormals+0x36 : retn 0x04 - { 0x36, 0xC2 }, // (Offset,Value)-Pair #7 - { 0x37, 0x04 }, // (Offset,Value)-Pair #8 - } -}; - // ****************************************************************** // * IDirect3DDevice8_SetRenderState_Dxt1NoiseEnable // ****************************************************************** @@ -1366,80 +1267,6 @@ SOOVPA<12> IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias_1_0_4627 = } }; -// ****************************************************************** -// * IDirect3DDevice8_SetRenderState_ShadowFunc -// ****************************************************************** -SOOVPA<13> IDirect3DDevice8_SetRenderState_ShadowFunc_1_0_4627 = -{ - 0, // Large == 0 - 13, // Count == 13 - - -1, // XRef Not Saved - 0, // XRef Not Used - - { - // IDirect3DDevice8_SetRenderState_ShadowFunc+0x00 : push esi - { 0x00, 0x56 }, // (Offset,Value)-Pair #1 - - // IDirect3DDevice8_SetRenderState_ShadowFunc+0x09 : cmp eax, [esi+4] - { 0x09, 0x3B }, // (Offset,Value)-Pair #2 - { 0x0A, 0x46 }, // (Offset,Value)-Pair #3 - { 0x0B, 0x04 }, // (Offset,Value)-Pair #4 - - // IDirect3DDevice8_SetRenderState_ShadowFunc+0x0C : jb +0x05 - { 0x0C, 0x72 }, // (Offset,Value)-Pair #5 - { 0x0D, 0x05 }, // (Offset,Value)-Pair #6 - - // IDirect3DDevice8_SetRenderState_ShadowFunc+0x1D : lea edx, [ecx-0x0200] - { 0x1D, 0x8D }, // (Offset,Value)-Pair #7 - { 0x1E, 0x91 }, // (Offset,Value)-Pair #8 - { 0x1F, 0x00 }, // (Offset,Value)-Pair #9 - { 0x20, 0xFE }, // (Offset,Value)-Pair #10 - - // IDirect3DDevice8_SetRenderState_ShadowFunc+0x26 : add eax, 0x08 - { 0x26, 0x83 }, // (Offset,Value)-Pair #11 - { 0x27, 0xC0 }, // (Offset,Value)-Pair #12 - { 0x28, 0x08 }, // (Offset,Value)-Pair #13 - } -}; - -// ****************************************************************** -// * IDirect3DDevice8_SetRenderState_YuvEnable -// ****************************************************************** -SOOVPA<13> IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4627 = -{ - 0, // Large == 0 - 13, // Count == 13 - - -1, // XRef Not Saved - 0, // XRef Not Used - - { - // IDirect3DDevice8_SetRenderState_YuvEnable+0x00 : mov eax, [esp+0x04] - { 0x00, 0x8B }, // (Offset,Value)-Pair #1 - { 0x01, 0x44 }, // (Offset,Value)-Pair #2 - { 0x02, 0x24 }, // (Offset,Value)-Pair #3 - { 0x03, 0x04 }, // (Offset,Value)-Pair #4 - - // IDirect3DDevice8_SetRenderState_YuvEnable+0x10 : mov eax, [esi] - { 0x10, 0x8B }, // (Offset,Value)-Pair #5 - { 0x11, 0x06 }, // (Offset,Value)-Pair #6 - - // IDirect3DDevice8_SetRenderState_YuvEnable+0x12 : cmp eax, [esi+4] - { 0x12, 0x3B }, // (Offset,Value)-Pair #7 - { 0x13, 0x46 }, // (Offset,Value)-Pair #8 - { 0x14, 0x04 }, // (Offset,Value)-Pair #9 - - // IDirect3DDevice8_SetRenderState_YuvEnable+0x15 : jb +0x05 - { 0x15, 0x72 }, // (Offset,Value)-Pair #10 - { 0x16, 0x05 }, // (Offset,Value)-Pair #11 - - // IDirect3DDevice8_SetRenderState_YuvEnable+0x28 : retn 0x04 - { 0x28, 0xC2 }, // (Offset,Value)-Pair #12 - { 0x29, 0x04 }, // (Offset,Value)-Pair #13 - } -}; - // ****************************************************************** // * IDirect3DDevice8_DrawVerticesUP // ****************************************************************** @@ -2148,9 +1975,9 @@ OOVPATable D3D8_1_0_4627[] = "EmuIDirect3DDevice8_SetTextureState_TexCoordIndex" #endif }, - // IDirect3DDevice8::SetTextureState_BumpEnv + // IDirect3DDevice8::SetTextureState_BumpEnv (* unchanged since 4432 *) { - (OOVPA*)&IDirect3DDevice8_SetTextureState_BumpEnv_1_0_4627, + (OOVPA*)&IDirect3DDevice8_SetTextureState_BumpEnv_1_0_4432, XTL::EmuIDirect3DDevice8_SetTextureState_BumpEnv, @@ -2158,9 +1985,9 @@ OOVPATable D3D8_1_0_4627[] = "EmuIDirect3DDevice8_SetTextureState_BumpEnv" #endif }, - // IDirect3DDevice8::SetTextureState_BorderColor + // IDirect3DDevice8::SetTextureState_BorderColor (* unchanged since 4432 *) { - (OOVPA*)&IDirect3DDevice8_SetTextureState_BorderColor_1_0_4627, + (OOVPA*)&IDirect3DDevice8_SetTextureState_BorderColor_1_0_4432, XTL::EmuIDirect3DDevice8_SetTextureState_BorderColor, @@ -2178,9 +2005,9 @@ OOVPATable D3D8_1_0_4627[] = "EmuIDirect3DDevice8_SetRenderState_CullMode" #endif }, - // IDirect3DDevice8::SetRenderState_NormalizeNormals + // IDirect3DDevice8::SetRenderState_NormalizeNormals (* unchanged since 4432 *) { - (OOVPA*)&IDirect3DDevice8_SetRenderState_NormalizeNormals_1_0_4627, + (OOVPA*)&IDirect3DDevice8_SetRenderState_NormalizeNormals_1_0_4432, XTL::EmuIDirect3DDevice8_SetRenderState_NormalizeNormals, @@ -2288,9 +2115,9 @@ OOVPATable D3D8_1_0_4627[] = "EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias" #endif }, - // IDirect3DDevice8::SetRenderState_ShadowFunc + // IDirect3DDevice8::SetRenderState_ShadowFunc (* unchanged since 4432 *) { - (OOVPA*)&IDirect3DDevice8_SetRenderState_ShadowFunc_1_0_4627, + (OOVPA*)&IDirect3DDevice8_SetRenderState_ShadowFunc_1_0_4432, XTL::EmuIDirect3DDevice8_SetRenderState_ShadowFunc, @@ -2298,9 +2125,9 @@ OOVPATable D3D8_1_0_4627[] = "EmuIDirect3DDevice8_SetRenderState_ShadowFunc" #endif }, - // IDirect3DDevice8::SetRenderState_YuvEnable + // IDirect3DDevice8::SetRenderState_YuvEnable (* unchanged since 4432 *) { - (OOVPA*)&IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4627, + (OOVPA*)&IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4432, XTL::EmuIDirect3DDevice8_SetRenderState_YuvEnable, diff --git a/Source/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4432.inl b/Source/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4432.inl new file mode 100644 index 000000000..2b80e9d7f --- /dev/null +++ b/Source/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4432.inl @@ -0,0 +1,281 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->Xapi.1.0.4432.cpp +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2002-2003 Aaron Robinson +// * +// * All rights reserved +// * +// ****************************************************************** + +// ****************************************************************** +// * RtlFreeHeap +// ****************************************************************** +SOOVPA<9> RtlFreeHeap_1_0_4432 = +{ + 0, // Large == 0 + 9, // Count == 9 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // RtlFreeHeap+0x1F : test ecx, ecx + { 0x1F, 0x85 }, // (Offset,Value)-Pair #1 + { 0x20, 0xC9 }, // (Offset,Value)-Pair #2 + + // RtlFreeHeap+0x23 : mov al, 1 + { 0x23, 0xB0 }, // (Offset,Value)-Pair #3 + { 0x24, 0x01 }, // (Offset,Value)-Pair #4 + + // RtlFreeHeap+0x4B : test byte ptr [edi+5], 8 + { 0x4B, 0xF6 }, // (Offset,Value)-Pair #5 + { 0x4C, 0x47 }, // (Offset,Value)-Pair #6 + { 0x4D, 0x05 }, // (Offset,Value)-Pair #7 + + // RtlFreeHeap+0x6E : cmp ecx, 0x80 + { 0x6E, 0x81 }, // (Offset,Value)-Pair #8 + { 0x6F, 0xF9 }, // (Offset,Value)-Pair #9 + } +}; + +// ****************************************************************** +// * RtlSizeHeap +// ****************************************************************** +SOOVPA<11> RtlSizeHeap_1_0_4432 = +{ + 0, // Large == 0 + 11, // Count == 11 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // RtlSizeHeap+0x04 : mov al, [ecx-0x0B] + { 0x04, 0x8A }, // (Offset,Value)-Pair #1 + { 0x05, 0x41 }, // (Offset,Value)-Pair #2 + { 0x06, 0xF5 }, // (Offset,Value)-Pair #3 + + // RtlSizeHeap+0x07 : test al, 1 + { 0x07, 0xA8 }, // (Offset,Value)-Pair #4 + { 0x08, 0x01 }, // (Offset,Value)-Pair #5 + + // RtlSizeHeap+0x14 : movzx edx, word ptr [ecx-0x10] + { 0x14, 0x0F }, // (Offset,Value)-Pair #6 + { 0x15, 0xB7 }, // (Offset,Value)-Pair #7 + { 0x16, 0x51 }, // (Offset,Value)-Pair #8 + { 0x17, 0xF0 }, // (Offset,Value)-Pair #9 + + // RtlSizeHeap+0x2A : sub eax, ecx + { 0x2A, 0x2B }, // (Offset,Value)-Pair #10 + { 0x2B, 0xC1 }, // (Offset,Value)-Pair #11 + } +}; + +// ****************************************************************** +// * XMountUtilityDrive +// ****************************************************************** +SOOVPA<8> XMountUtilityDrive_1_0_4432 = +{ + 0, // Large == 0 + 8, // Count == 8 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // XapiUnknownBad1+0x51 : push 0x0104 + { 0x51, 0x68 }, // (Offset,Value)-Pair #1 + { 0x52, 0x04 }, // (Offset,Value)-Pair #2 + { 0x53, 0x01 }, // (Offset,Value)-Pair #3 + + // XapiUnknownBad1+0xB3 : jnz +0x1A + { 0xB3, 0x75 }, // (Offset,Value)-Pair #4 + { 0xB4, 0x1A }, // (Offset,Value)-Pair #5 + + // XapiUnknownBad1+0xE8 : setnl al + { 0xE8, 0x0F }, // (Offset,Value)-Pair #6 + { 0xE9, 0x9D }, // (Offset,Value)-Pair #7 + { 0xEA, 0xC0 }, // (Offset,Value)-Pair #8 + + // TODO: Finish signature, toss out function call basically + } +}; + +// ****************************************************************** +// * XAPI_1_0_4432 +// ****************************************************************** +OOVPATable XAPI_1_0_4432[] = +{ + // RtlCreateHeap (* unchanged since 1.0.4361 *) (* OR FARTHER *) + { + (OOVPA*)&RtlCreateHeap_1_0_3911, + + XTL::EmuRtlCreateHeap, + + #ifdef _DEBUG_TRACE + "EmuRtlCreateHeap" + #endif + }, + // RtlAllocateHeap (* unchanged since 1.0.4361 *) (* OR FARTHER *) + { + (OOVPA*)&RtlAllocateHeap_1_0_3911, + + XTL::EmuRtlAllocateHeap, + + #ifdef _DEBUG_TRACE + "EmuRtlAllocateHeap" + #endif + }, + // RtlFreeHeap + { + (OOVPA*)&RtlFreeHeap_1_0_4432, + + XTL::EmuRtlFreeHeap, + + #ifdef _DEBUG_TRACE + "EmuRtlFreeHeap" + #endif + }, + // RtlSizeHeap + { + (OOVPA*)&RtlSizeHeap_1_0_4432, + + XTL::EmuRtlSizeHeap, + + #ifdef _DEBUG_TRACE + "EmuRtlSizeHeap" + #endif + }, + // XMountUtilityDrive + { + (OOVPA*)&XMountUtilityDrive_1_0_4432, + + XTL::EmuXMountUtilityDrive, + + #ifdef _DEBUG_TRACE + "EmuXMountUtilityDrive" + #endif + }, + // XInitDevices (* unchanged since 1.0.3911 *) + { + (OOVPA*)&XInitDevices_1_0_3911, + + XTL::EmuXInitDevices, + + #ifdef _DEBUG_TRACE + "EmuXInitDevices" + #endif + }, + // XGetDevices (* unchanged since 1.0.4134 *) + { + (OOVPA*)&XGetDevices_1_0_4134, + + XTL::EmuXGetDevices, + + #ifdef _DEBUG_TRACE + "EmuXGetDevices" + #endif + }, + // XInputOpen (* unchanged since 1.0.4361 *) + { + (OOVPA*)&XInputOpen_1_0_4361, + + XTL::EmuXInputOpen, + + #ifdef _DEBUG_TRACE + "EmuXInputOpen" + #endif + }, + // XInputGetCapabilities (* unchanged since 1.0.4361 *) + { + (OOVPA*)&XInputGetCapabilities_1_0_4361, + + XTL::EmuXInputGetCapabilities, + + #ifdef _DEBUG_TRACE + "EmuXInputGetCapabilities" + #endif + }, + // XInputGetState (* unchanged since 1.0.4361 *) + { + (OOVPA*)&XInputGetState_1_0_4361, + + XTL::EmuXInputGetState, + + #ifdef _DEBUG_TRACE + "EmuXInputGetState" + #endif + }, + // XInputSetState (* unchanged since 1.0.4361 *) + { + (OOVPA*)&XInputSetState_1_0_4361, + + XTL::EmuXInputSetState, + + #ifdef _DEBUG_TRACE + "EmuXInputSetState" + #endif + }, + // XapiThreadStartup (* unchanged since 1.0.4361 *) + { + (OOVPA*)&XapiThreadStartup_1_0_4361, + + XTL::EmuXapiThreadStartup, + + #ifdef _DEBUG_TRACE + "EmuXapiThreadStartup" + #endif + }, + //* Too High Level + // XapiInitProcess (* unchanged since 1.0.4361 *) + { + (OOVPA*)&XapiInitProcess_1_0_4361, + + XTL::EmuXapiInitProcess, + + #ifdef _DEBUG_TRACE + "EmuXapiInitProcess" + #endif + }, + //*/ + // XapiBootToDash (* unchanged since 1.0.3911 *) + { + (OOVPA*)&XapiBootDash_1_0_3911, + + XTL::EmuXapiBootDash, + + #ifdef _DEBUG_TRACE + "EmuXapiBootDash" + #endif + }, +}; + +// ****************************************************************** +// * XAPI_1_0_4432_SIZE +// ****************************************************************** +uint32 XAPI_1_0_4432_SIZE = sizeof(XAPI_1_0_4432); diff --git a/Source/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4627.inl b/Source/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4627.inl index 163c7ce6f..ff571e9f7 100644 --- a/Source/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4627.inl +++ b/Source/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4627.inl @@ -63,192 +63,6 @@ SOOVPA<9> RtlFreeHeap_1_0_4627 = } }; -// ****************************************************************** -// * RtlSizeHeap -// ****************************************************************** -SOOVPA<11> RtlSizeHeap_1_0_4627 = -{ - 0, // Large == 0 - 11, // Count == 11 - - -1, // XRef Not Saved - 0, // XRef Not Used - - { - // RtlSizeHeap+0x04 : mov al, [ecx-0x0B] - { 0x04, 0x8A }, // (Offset,Value)-Pair #1 - { 0x05, 0x41 }, // (Offset,Value)-Pair #2 - { 0x06, 0xF5 }, // (Offset,Value)-Pair #3 - - // RtlSizeHeap+0x07 : test al, 1 - { 0x07, 0xA8 }, // (Offset,Value)-Pair #4 - { 0x08, 0x01 }, // (Offset,Value)-Pair #5 - - // RtlSizeHeap+0x14 : movzx edx, word ptr [ecx-0x10] - { 0x14, 0x0F }, // (Offset,Value)-Pair #6 - { 0x15, 0xB7 }, // (Offset,Value)-Pair #7 - { 0x16, 0x51 }, // (Offset,Value)-Pair #8 - { 0x17, 0xF0 }, // (Offset,Value)-Pair #9 - - // RtlSizeHeap+0x2A : sub eax, ecx - { 0x2A, 0x2B }, // (Offset,Value)-Pair #10 - { 0x2B, 0xC1 }, // (Offset,Value)-Pair #11 - } -}; - -// ****************************************************************** -// * XMountUtilityDrive -// ****************************************************************** -SOOVPA<8> XMountUtilityDrive_1_0_4627 = -{ - 0, // Large == 0 - 8, // Count == 8 - - -1, // XRef Not Saved - 0, // XRef Not Used - - { - // XapiUnknownBad1+0x51 : push 0x0104 - { 0x51, 0x68 }, // (Offset,Value)-Pair #1 - { 0x52, 0x04 }, // (Offset,Value)-Pair #2 - { 0x53, 0x01 }, // (Offset,Value)-Pair #3 - - // XapiUnknownBad1+0xB3 : jnz +0x1A - { 0xB3, 0x75 }, // (Offset,Value)-Pair #4 - { 0xB4, 0x1A }, // (Offset,Value)-Pair #5 - - // XapiUnknownBad1+0xE8 : setnl al - { 0xE8, 0x0F }, // (Offset,Value)-Pair #6 - { 0xE9, 0x9D }, // (Offset,Value)-Pair #7 - { 0xEA, 0xC0 }, // (Offset,Value)-Pair #8 - - // TODO: Finish signature, toss out function call basically - } -}; - -// s+ -/* not necessary? -// ****************************************************************** -// * XCalculateSignatureBeginEx -// ****************************************************************** -SOOVPA<8> XCalculateSignatureBeginEx_1_0_4627 = -{ - 0, // Large == 0 - 8, // Count == 8 - - XREF_XAPIXCALCULATESIGNATUREBEGINEX, // XRef Is Saved - 0, // XRef Not Used - - { - // XCalculateSignatureBeginEx+0x09 : push 7Ch - { 0x09, 0x6A }, - { 0x0A, 0x7C }, - - // XCalculateSignatureBeginEx+0x2D : lea eax, [esi+5Ch] - { 0x2D, 0x8D }, - { 0x2E, 0x46 }, - { 0x2F, 0x5C }, - - // XCalculateSignatureBeginEx+0xE8 : cmp edx, 40h ; '@' - { 0x43, 0x83 }, - { 0x44, 0xFA }, - { 0x45, 0x40 }, - } -}; - -// ****************************************************************** -// * XCalculateSignatureBegin -// ****************************************************************** -SOOVPA<12> XCalculateSignatureBegin_1_0_4627 = -{ - 0, // Large == 0 - 12, // Count == 12 - - -1, // XRef Not Saved - 1, // XRef Is Used - - { - // XCalculateSignatureBegin+0x0C : call [XCalculateSignatureBeginEx] - { 0x0D, XREF_XAPIXCALCULATESIGNATUREBEGINEX }, - - // XCalculateSignatureBegin+0x00 : mov eax, ds:10118h - { 0x00, 0xA1 }, - { 0x01, 0x18 }, - { 0x02, 0x01 }, - { 0x03, 0x01 }, - { 0x04, 0x00 }, - - // XCalculateSignatureBegin+0x08 : push [esp+4+arg_0] - { 0x08, 0xFF }, - { 0x09, 0x74 }, - { 0x0A, 0x24 }, - { 0x0B, 0x08 }, - - // XCalculateSignatureBegin+0x11 : retn 4 - { 0x12, 0x04 }, - { 0x13, 0x00 }, - } -}; - -// ****************************************************************** -// * XCalculateSignatureUpdate -// ****************************************************************** -SOOVPA<9> XCalculateSignatureUpdate_1_0_4627 = -{ - 0, // Large == 0 - 9, // Count == 9 - - -1, // XRef Not Saved - 0, // XRef Not Used - - { - // XCalculateSignatureUpdate+0x04 : mov eax, [esp+4+arg_0] - { 0x04, 0x8B }, - { 0x05, 0x44 }, - { 0x06, 0x24 }, - { 0x07, 0x08 }, - - // XCalculateSignatureUpdate+0x0C : add eax, 8 - { 0x0C, 0x83 }, - { 0x0D, 0xC0 }, - { 0x0E, 0x08 }, - - // XCalculateSignatureUpdate+0x11 : xor eax, eax - { 0x15, 0x33 }, - { 0x16, 0xC0 }, - } -}; - -// ****************************************************************** -// * XCalculateSignatureEnd -// ****************************************************************** -SOOVPA<8> XCalculateSignatureEnd_1_0_4627 = -{ - 0, // Large == 0 - 8, // Count == 8 - - -1, // XRef Not Saved - 0, // XRef Not Used - - { - // XCalculateSignatureEnd+0x03 : sub esp, 14h - { 0x03, 0x83 }, - { 0x04, 0xEC }, - { 0x05, 0x14 }, - - // XCalculateSignatureEnd+0x22 : push 10h - { 0x22, 0x6A }, - { 0x23, 0x10 }, - - // XCalculateSignatureEnd+0x37 : lea eax, [ebp+var_14] - { 0x37, 0x8D }, - { 0x38, 0x45 }, - { 0x39, 0xEC }, - } -}; -//*/ -// +s - // ****************************************************************** // * XAPI_1_0_4627 // ****************************************************************** @@ -284,9 +98,9 @@ OOVPATable XAPI_1_0_4627[] = "EmuRtlFreeHeap" #endif }, - // RtlSizeHeap + // RtlSizeHeap (* unchanged since 4432 *) { - (OOVPA*)&RtlSizeHeap_1_0_4627, + (OOVPA*)&RtlSizeHeap_1_0_4432, XTL::EmuRtlSizeHeap, @@ -294,9 +108,9 @@ OOVPATable XAPI_1_0_4627[] = "EmuRtlSizeHeap" #endif }, - // XMountUtilityDrive + // XMountUtilityDrive (* unchanged since 4432 *) { - (OOVPA*)&XMountUtilityDrive_1_0_4627, + (OOVPA*)&XMountUtilityDrive_1_0_4432, XTL::EmuXMountUtilityDrive,