i forget
This commit is contained in:
parent
0613b30f49
commit
77effebf56
|
@ -55,10 +55,10 @@ typedef signed short sint16;
|
|||
typedef signed long sint32;
|
||||
|
||||
// define this to trace intercepted function calls
|
||||
#define _DEBUG_TRACE
|
||||
//#define _DEBUG_TRACE
|
||||
|
||||
// define this to trace warnings
|
||||
#define _DEBUG_WARNINGS
|
||||
//#define _DEBUG_WARNINGS
|
||||
|
||||
// version information
|
||||
#ifndef _DEBUG_TRACE
|
||||
|
|
|
@ -44,5 +44,6 @@ extern void EmuExecutePushBuffer
|
|||
// push buffer debugging
|
||||
extern bool g_bStepPush;
|
||||
extern bool g_bSkipPush;
|
||||
extern bool g_bBrkPush;
|
||||
|
||||
#endif
|
|
@ -471,6 +471,23 @@ BOOL WINAPI EmuSetThreadPriority
|
|||
int nPriority
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuGetThreadPriority
|
||||
// ******************************************************************
|
||||
int WINAPI EmuGetThreadPriority
|
||||
(
|
||||
HANDLE hThread
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuSetThreadPriorityBoost
|
||||
// ******************************************************************
|
||||
BOOL WINAPI EmuSetThreadPriorityBoost
|
||||
(
|
||||
HANDLE hThread,
|
||||
BOOL DisablePriorityBoost
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuGetExitCodeThread
|
||||
// ******************************************************************
|
||||
|
|
|
@ -402,6 +402,10 @@ static LRESULT WINAPI EmuMsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar
|
|||
{
|
||||
if(wParam == VK_ESCAPE)
|
||||
PostMessage(hWnd, WM_CLOSE, 0, 0);
|
||||
else if(wParam == VK_F10)
|
||||
{
|
||||
XTL::g_bBrkPush = TRUE;
|
||||
}
|
||||
else if(wParam == VK_F11)
|
||||
{
|
||||
if(g_iWireframe++ == 2)
|
||||
|
@ -2032,7 +2036,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateVertexShader
|
|||
|
||||
DWORD *pRecompiled=0;
|
||||
|
||||
//XTL::EmuRecompileVSHDeclaration((DWORD*)pDeclaration, (DWORD)pD3DVertexShader);
|
||||
XTL::EmuRecompileVSHDeclaration((DWORD*)pDeclaration, (DWORD)pD3DVertexShader);
|
||||
//XTL::EmuRecompileVSHFunction((DWORD*)pFunction, &pRecompiled);
|
||||
|
||||
HRESULT hRet = D3D_OK;
|
||||
|
@ -4531,6 +4535,8 @@ HRESULT WINAPI XTL::EmuIDirect3DTexture8_GetSurfaceLevel
|
|||
|
||||
*ppSurfaceLevel = new X_D3DSurface();
|
||||
|
||||
(*ppSurfaceLevel)->Data = 0xB00BBABE;
|
||||
|
||||
hRet = pTexture8->GetSurfaceLevel(Level, &((*ppSurfaceLevel)->EmuSurface8));
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
|
@ -6382,9 +6388,9 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetVertexShader
|
|||
if(Handle > 0xFFFF)
|
||||
{
|
||||
X_D3DVertexShader *pD3DVertexShader = (X_D3DVertexShader*)Handle;
|
||||
|
||||
// hRet = g_pD3DDevice8->SetVertexShader(pD3DVertexShader->Handle);
|
||||
hRet = g_pD3DDevice8->SetVertexShader(D3DFVF_XYZ);
|
||||
|
||||
hRet = g_pD3DDevice8->SetVertexShader(pD3DVertexShader->Handle);
|
||||
// hRet = g_pD3DDevice8->SetVertexShader(D3DFVF_XYZ);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -132,6 +132,8 @@ XTL::X_D3DFORMAT XTL::EmuPC2XB_D3DFormat(D3DFORMAT Format)
|
|||
return 0x0E;
|
||||
case D3DFMT_DXT1:
|
||||
return 0x0C;
|
||||
case D3DFMT_A1R5G5B5: // Linear (X_D3DFMT_LIN_A1R5G5B5)
|
||||
return 0x10;
|
||||
case D3DFMT_X8R8G8B8:
|
||||
// return 0x1E; // Linear (X_D3DFMT_LIN_X8R8G8B8)
|
||||
return 0x07;
|
||||
|
|
|
@ -46,6 +46,7 @@ extern XTL::LPDIRECT3DDEVICE8 g_pD3DDevice8; // Direct3D8 Device
|
|||
|
||||
bool XTL::g_bStepPush = FALSE;
|
||||
bool XTL::g_bSkipPush = FALSE;
|
||||
bool XTL::g_bBrkPush = FALSE;
|
||||
|
||||
// pushbuffer execution emulation
|
||||
void XTL::EmuExecutePushBuffer
|
||||
|
@ -54,6 +55,28 @@ void XTL::EmuExecutePushBuffer
|
|||
PVOID pFixup
|
||||
)
|
||||
{
|
||||
/*
|
||||
if(g_bStepPush && g_bSkipPush)
|
||||
{
|
||||
g_bBrkPush = FALSE;
|
||||
_asm int 3;
|
||||
|
||||
IDirect3DVertexBuffer8 *pVertexBuffer=0;
|
||||
|
||||
UINT uiStride=0;
|
||||
|
||||
g_pD3DDevice8->GetStreamSource(0, &pVertexBuffer, &uiStride);
|
||||
|
||||
BYTE *pbData=0;
|
||||
|
||||
pVertexBuffer->Lock(0, 0, &pbData, D3DLOCK_READONLY);
|
||||
|
||||
_asm int 3
|
||||
|
||||
pVertexBuffer->Unlock();
|
||||
}
|
||||
*/
|
||||
|
||||
if(g_bSkipPush)
|
||||
return;
|
||||
|
||||
|
|
|
@ -130,12 +130,60 @@ void XTL::EmuRecompileVSHDeclaration
|
|||
DWORD dwDataType = (pDeclaration[v] >> D3DVSD_DATATYPESHIFT) & 0xFF;
|
||||
DWORD dwNewDataType = 0;
|
||||
|
||||
/* experimental!
|
||||
switch(dwVertexRegister)
|
||||
{
|
||||
case 0:
|
||||
pD3DVertexShader->Handle |= D3DFVF_XYZ;
|
||||
break;
|
||||
case 1:
|
||||
pD3DVertexShader->Handle |= D3DFVF_DIFFUSE;
|
||||
break;
|
||||
case 2:
|
||||
pD3DVertexShader->Handle &= ~D3DFVF_XYZ;
|
||||
pD3DVertexShader->Handle |= D3DFVF_XYZRHW;
|
||||
break;
|
||||
case 3:
|
||||
pD3DVertexShader->Handle |= D3DFVF_DIFFUSE;
|
||||
break;
|
||||
case 4:
|
||||
pD3DVertexShader->Handle |= D3DFVF_SPECULAR;
|
||||
break;
|
||||
case 5:
|
||||
pD3DVertexShader->Handle |= D3DFVF_DIFFUSE;
|
||||
break;
|
||||
case 6:
|
||||
pD3DVertexShader->Handle |= D3DFVF_DIFFUSE;
|
||||
break;
|
||||
case 7:
|
||||
pD3DVertexShader->Handle |= D3DFVF_DIFFUSE;
|
||||
break;
|
||||
case 8:
|
||||
pD3DVertexShader->Handle |= D3DFVF_DIFFUSE;
|
||||
break;
|
||||
case 9:
|
||||
pD3DVertexShader->Handle &= ~D3DFVF_TEXCOUNT_MASK;
|
||||
pD3DVertexShader->Handle |= D3DFVF_TEX1;
|
||||
break;
|
||||
case 10:
|
||||
pD3DVertexShader->Handle &= ~D3DFVF_TEXCOUNT_MASK;
|
||||
pD3DVertexShader->Handle |= D3DFVF_TEX2;
|
||||
break;
|
||||
case 11:
|
||||
pD3DVertexShader->Handle &= ~D3DFVF_TEXCOUNT_MASK;
|
||||
pD3DVertexShader->Handle |= D3DFVF_TEX3;
|
||||
break;
|
||||
case 12:
|
||||
pD3DVertexShader->Handle &= ~D3DFVF_TEXCOUNT_MASK;
|
||||
pD3DVertexShader->Handle |= D3DFVF_TEX4;
|
||||
break;
|
||||
}*/
|
||||
|
||||
switch(dwDataType)
|
||||
{
|
||||
case 0x12:
|
||||
DbgPrintf("D3DVSDT_FLOAT1");
|
||||
dwNewDataType = D3DVSDT_FLOAT1;
|
||||
pD3DVertexShader->Handle |= D3DFVF_XYZ;
|
||||
break;
|
||||
case 0x22:
|
||||
DbgPrintf("D3DVSDT_FLOAT2");
|
||||
|
@ -144,17 +192,14 @@ void XTL::EmuRecompileVSHDeclaration
|
|||
case 0x32:
|
||||
DbgPrintf("D3DVSDT_FLOAT3");
|
||||
dwNewDataType = D3DVSDT_FLOAT3;
|
||||
pD3DVertexShader->Handle |= D3DFVF_NORMAL;
|
||||
break;
|
||||
case 0x42:
|
||||
DbgPrintf("D3DVSDT_FLOAT4");
|
||||
dwNewDataType = D3DVSDT_FLOAT4;
|
||||
pD3DVertexShader->Handle |= D3DFVF_DIFFUSE;
|
||||
break;
|
||||
case 0x40:
|
||||
DbgPrintf("D3DVSDT_D3DCOLOR");
|
||||
dwNewDataType = D3DVSDT_D3DCOLOR;
|
||||
pD3DVertexShader->Handle |= D3DFVF_SPECULAR;
|
||||
break;
|
||||
case 0x25:
|
||||
DbgPrintf("D3DVSDT_SHORT2");
|
||||
|
@ -175,7 +220,6 @@ void XTL::EmuRecompileVSHDeclaration
|
|||
case 0x31:
|
||||
DbgPrintf("D3DVSDT_NORMSHORT3 /* xbox ext. */");
|
||||
dwNewDataType = D3DVSDT_FLOAT3;
|
||||
pD3DVertexShader->Handle |= D3DFVF_NORMAL;
|
||||
break;
|
||||
case 0x41:
|
||||
DbgPrintf("D3DVSDT_NORMSHORT4 /* xbox ext. */");
|
||||
|
|
|
@ -2038,6 +2038,36 @@ XBSYSAPI EXPORTNUM(226) NTSTATUS NTAPI xboxkrnl::NtSetInformationFile
|
|||
return ret;
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * 0x00E7 - NtSuspendThread
|
||||
// ******************************************************************
|
||||
XBSYSAPI EXPORTNUM(231) NTSTATUS NTAPI xboxkrnl::NtSuspendThread
|
||||
(
|
||||
IN HANDLE ThreadHandle,
|
||||
OUT PULONG PreviousSuspendCount OPTIONAL
|
||||
)
|
||||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// debug trace
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuKrnl (0x%X): NtSuspendThread\n"
|
||||
"(\n"
|
||||
" ThreadHandle : 0x%.08X\n"
|
||||
" PreviousSuspendCount : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), ThreadHandle, PreviousSuspendCount);
|
||||
}
|
||||
#endif
|
||||
|
||||
NTSTATUS ret = NtDll::NtSuspendThread(ThreadHandle, PreviousSuspendCount);
|
||||
|
||||
EmuSwapFS(); // Xbox FS
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * 0x00E8 - NtUserIoApcDispatcher
|
||||
// ******************************************************************
|
||||
|
|
|
@ -749,6 +749,41 @@ BOOL WINAPI XTL::EmuCloseHandle
|
|||
return bRet;
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuSetThreadPriorityBoost
|
||||
// ******************************************************************
|
||||
BOOL WINAPI XTL::EmuSetThreadPriorityBoost
|
||||
(
|
||||
HANDLE hThread,
|
||||
BOOL DisablePriorityBoost
|
||||
)
|
||||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuSetThreadPriorityBoost\n"
|
||||
"(\n"
|
||||
" hThread : 0x%.08X\n"
|
||||
" DisablePriorityBoost: 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hThread, DisablePriorityBoost);
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOL bRet = SetThreadPriorityBoost(hThread, DisablePriorityBoost);
|
||||
|
||||
if(bRet == FALSE)
|
||||
EmuWarning("SetThreadPriorityBoost Failed!");
|
||||
|
||||
EmuSwapFS(); // XBox FS
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuSetThreadPriority
|
||||
// ******************************************************************
|
||||
|
@ -784,6 +819,40 @@ BOOL WINAPI XTL::EmuSetThreadPriority
|
|||
return bRet;
|
||||
}
|
||||
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuGetThreadPriority
|
||||
// ******************************************************************
|
||||
int WINAPI XTL::EmuGetThreadPriority
|
||||
(
|
||||
HANDLE hThread
|
||||
)
|
||||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuGetThreadPriority\n"
|
||||
"(\n"
|
||||
" hThread : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hThread);
|
||||
}
|
||||
#endif
|
||||
|
||||
int iRet = GetThreadPriority(hThread);
|
||||
|
||||
if(iRet == THREAD_PRIORITY_ERROR_RETURN)
|
||||
EmuWarning("GetThreadPriority Failed!");
|
||||
|
||||
EmuSwapFS(); // XBox FS
|
||||
|
||||
return iRet;
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuGetExitCodeThread
|
||||
// ******************************************************************
|
||||
|
|
|
@ -868,6 +868,44 @@ SOOVPA<12> IDirect3DDevice8_CreateTexture2_1_0_4627 =
|
|||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_CreateTexture2B
|
||||
// ******************************************************************
|
||||
SOOVPA<12> IDirect3DDevice8_CreateTexture2B_1_0_4627 =
|
||||
{
|
||||
0, // Large == 0
|
||||
12, // Count == 12
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3DDevice8_CreateTexture2B+0x02 : lea eax, [esp+0x20]
|
||||
{ 0x02, 0x8D }, // (Offset,Value)-Pair #1
|
||||
{ 0x05, 0x20 }, // (Offset,Value)-Pair #2
|
||||
|
||||
// IDirect3DDevice8_CreateTexture2B+0x0E : setz dl
|
||||
{ 0x0E, 0x0F }, // (Offset,Value)-Pair #3
|
||||
{ 0x0F, 0x94 }, // (Offset,Value)-Pair #4
|
||||
{ 0x10, 0xC2 }, // (Offset,Value)-Pair #5
|
||||
|
||||
// IDirect3DDevice8_CreateTexture2B+0x2A : push 0x00
|
||||
{ 0x25, 0x6A }, // (Offset,Value)-Pair #6
|
||||
{ 0x26, 0x00 }, // (Offset,Value)-Pair #7
|
||||
|
||||
// IDirect3DDevice8_CreateTexture2B+0x53 : call [abs]
|
||||
{ 0x50, 0xE8 }, // (Offset,Value)-Pair #8
|
||||
|
||||
// IDirect3DDevice8_CreateTexture2B+0x78 : jnz +0x0D
|
||||
{ 0x75, 0x75 }, // (Offset,Value)-Pair #9
|
||||
{ 0x76, 0x0D }, // (Offset,Value)-Pair #10
|
||||
|
||||
// IDirect3DDevice8_CreateTexture2B+0xAE : retn 0x1C
|
||||
{ 0x81, 0xC2 }, // (Offset,Value)-Pair #11
|
||||
{ 0x82, 0x1C }, // (Offset,Value)-Pair #12
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_GetDisplayMode
|
||||
// ******************************************************************
|
||||
|
@ -1197,6 +1235,34 @@ SOOVPA<10> IDirect3DDevice8_SetTextureState_TexCoordIndex_1_0_4627 =
|
|||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_SetRenderState_NormalizeNormalsB
|
||||
// ******************************************************************
|
||||
SOOVPA<8> IDirect3DDevice8_SetRenderState_NormalizeNormalsB_1_0_4627 =
|
||||
{
|
||||
0, // Large == 0
|
||||
8, // Count == 8
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3DDevice8_SetRenderState_NormalizeNormalsB+0x07 : mov eax, [esi]
|
||||
{ 0x07, 0x8B }, // (Offset,Value)-Pair #1
|
||||
{ 0x08, 0x06 }, // (Offset,Value)-Pair #2
|
||||
|
||||
// IDirect3DDevice8_SetRenderState_NormalizeNormalsB+0x2E : or [addr], 0x200
|
||||
{ 0x2E, 0x81 }, // (Offset,Value)-Pair #3
|
||||
{ 0x2F, 0x0D }, // (Offset,Value)-Pair #4
|
||||
{ 0x34, 0x00 }, // (Offset,Value)-Pair #5
|
||||
{ 0x35, 0x02 }, // (Offset,Value)-Pair #6
|
||||
|
||||
// IDirect3DDevice8_SetRenderState_NormalizeNormalsB+0x3F : retn 0x04
|
||||
{ 0x3F, 0xC2 }, // (Offset,Value)-Pair #7
|
||||
{ 0x40, 0x04 }, // (Offset,Value)-Pair #8
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_SetRenderState_Dxt1NoiseEnable
|
||||
// ******************************************************************
|
||||
|
@ -1261,6 +1327,41 @@ SOOVPA<13> IDirect3DDevice8_SetRenderState_ZEnable_1_0_4627 =
|
|||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_SetRenderState_ZEnableB
|
||||
// ******************************************************************
|
||||
SOOVPA<13> IDirect3DDevice8_SetRenderState_ZEnableB_1_0_4627 =
|
||||
{
|
||||
0, // Large == 0
|
||||
13, // Count == 13
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3DDevice8_SetRenderState_ZEnableB+0x0C : jb +0x0E
|
||||
{ 0x0C, 0x72 }, // (Offset,Value)-Pair #1
|
||||
{ 0x0D, 0x0E }, // (Offset,Value)-Pair #2
|
||||
|
||||
// IDirect3DDevice8_SetRenderState_ZEnableB+0x1B : mov ecx, [esi+0x21B8h]
|
||||
{ 0x24, 0x8B }, // (Offset,Value)-Pair #3
|
||||
{ 0x25, 0x8E }, // (Offset,Value)-Pair #4
|
||||
{ 0x26, 0xB8 }, // (Offset,Value)-Pair #5
|
||||
{ 0x27, 0x21 }, // (Offset,Value)-Pair #6
|
||||
|
||||
// IDirect3DDevice8_SetRenderState_ZEnableB+0x37 : mov dword ptr [eax], 0x4030
|
||||
{ 0x37, 0xC7 }, // (Offset,Value)-Pair #7
|
||||
{ 0x38, 0x00 }, // (Offset,Value)-Pair #8
|
||||
{ 0x39, 0x0C }, // (Offset,Value)-Pair #9
|
||||
{ 0x3A, 0x03 }, // (Offset,Value)-Pair #10
|
||||
{ 0x3B, 0x04 }, // (Offset,Value)-Pair #11
|
||||
|
||||
// IDirect3DDevice8_SetRenderState_ZEnableB+0x99 : retn 0x04
|
||||
{ 0x99, 0xC2 }, // (Offset,Value)-Pair #12
|
||||
{ 0x9A, 0x04 }, // (Offset,Value)-Pair #13
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias
|
||||
// ******************************************************************
|
||||
|
@ -1408,27 +1509,101 @@ SOOVPA<11> IDirect3DVertexBuffer8_Lock2_1_0_4627 =
|
|||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3DVertexBuffer8_Lock+0x01 : mov bl, [esp+0x0C]
|
||||
// IDirect3DVertexBuffer8_Lock2+0x01 : mov bl, [esp+0x0C]
|
||||
{ 0x01, 0x8A }, // (Offset,Value)-Pair #1
|
||||
{ 0x02, 0x5C }, // (Offset,Value)-Pair #2
|
||||
{ 0x03, 0x24 }, // (Offset,Value)-Pair #3
|
||||
{ 0x04, 0x0C }, // (Offset,Value)-Pair #4
|
||||
|
||||
// IDirect3DVertexBuffer8_Lock+0x09 : jnz +0x24
|
||||
// IDirect3DVertexBuffer8_Lock2+0x09 : jnz +0x24
|
||||
{ 0x09, 0x75 }, // (Offset,Value)-Pair #5
|
||||
{ 0x0A, 0x24 }, // (Offset,Value)-Pair #6
|
||||
|
||||
// IDirect3DVertexBuffer8_Lock+0x2F : test bl, 0xA0
|
||||
// IDirect3DVertexBuffer8_Lock2+0x2F : test bl, 0xA0
|
||||
{ 0x2F, 0xF6 }, // (Offset,Value)-Pair #7
|
||||
{ 0x30, 0xC3 }, // (Offset,Value)-Pair #8
|
||||
{ 0x31, 0xA0 }, // (Offset,Value)-Pair #9
|
||||
|
||||
// IDirect3DVertexBuffer8_Lock+0x48 : retn 0x08
|
||||
// IDirect3DVertexBuffer8_Lock2+0x48 : retn 0x08
|
||||
{ 0x48, 0xC2 }, // (Offset,Value)-Pair #10
|
||||
{ 0x49, 0x08 }, // (Offset,Value)-Pair #11
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DVertexBuffer8_Lock2B
|
||||
// ******************************************************************
|
||||
SOOVPA<11> IDirect3DVertexBuffer8_Lock2B_1_0_4627 =
|
||||
{
|
||||
0, // Large == 0
|
||||
11, // Count == 11
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3DVertexBuffer8_Lock2B+0x01 : mov bl, [esp+0x0C]
|
||||
{ 0x01, 0x8A }, // (Offset,Value)-Pair #1
|
||||
{ 0x02, 0x5C }, // (Offset,Value)-Pair #2
|
||||
{ 0x03, 0x24 }, // (Offset,Value)-Pair #3
|
||||
{ 0x04, 0x0C }, // (Offset,Value)-Pair #4
|
||||
|
||||
// IDirect3DVertexBuffer8_Lock2B+0x09 : jnz +0x24
|
||||
{ 0x09, 0x75 }, // (Offset,Value)-Pair #5
|
||||
{ 0x0A, 0x2D }, // (Offset,Value)-Pair #6
|
||||
|
||||
// IDirect3DVertexBuffer8_Lock2B+0x2F : test bl, 0xA0
|
||||
{ 0x38, 0xF6 }, // (Offset,Value)-Pair #7
|
||||
{ 0x39, 0xC3 }, // (Offset,Value)-Pair #8
|
||||
{ 0x3A, 0xA0 }, // (Offset,Value)-Pair #9
|
||||
|
||||
// IDirect3DVertexBuffer8_Lock2B+0x48 : retn 0x08
|
||||
{ 0x6B, 0xC2 }, // (Offset,Value)-Pair #10
|
||||
{ 0x6C, 0x08 }, // (Offset,Value)-Pair #11
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DSurface8_LockRectB
|
||||
// ******************************************************************
|
||||
SOOVPA<17> IDirect3DSurface8_LockRectB_1_0_4627 =
|
||||
{
|
||||
0, // Large == 0
|
||||
17, // Count == 17
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3DSurface8_LockRectB+0x00 : mov eax, [esp+0x10]
|
||||
{ 0x00, 0x8B }, // (Offset,Value)-Pair #1
|
||||
{ 0x01, 0x44 }, // (Offset,Value)-Pair #2
|
||||
{ 0x02, 0x24 }, // (Offset,Value)-Pair #3
|
||||
{ 0x03, 0x10 }, // (Offset,Value)-Pair #4
|
||||
|
||||
// IDirect3DSurface8_LockRectB+0x04 : mov ecx, [esp+0x04]
|
||||
{ 0x04, 0x8B }, // (Offset,Value)-Pair #5
|
||||
{ 0x05, 0x4C }, // (Offset,Value)-Pair #6
|
||||
{ 0x06, 0x24 }, // (Offset,Value)-Pair #7
|
||||
{ 0x07, 0x04 }, // (Offset,Value)-Pair #8
|
||||
|
||||
// IDirect3DSurface8_LockRectB+0x08 : push esi; mov esi, [esp+0x0C]; push eax
|
||||
{ 0x08, 0x56 }, // (Offset,Value)-Pair #9
|
||||
{ 0x09, 0x8B }, // (Offset,Value)-Pair #10
|
||||
{ 0x0A, 0x74 }, // (Offset,Value)-Pair #11
|
||||
{ 0x0B, 0x24 }, // (Offset,Value)-Pair #12
|
||||
{ 0x0C, 0x0C }, // (Offset,Value)-Pair #13
|
||||
{ 0x0D, 0x50 }, // (Offset,Value)-Pair #14
|
||||
|
||||
// IDirect3DSurface8_LockRectB+0x17 : call [addr]
|
||||
{ 0x17, 0xE8 }, // (Offset,Value)-Pair #15
|
||||
|
||||
// IDirect3DSurface8_LockRectB+0x1D : retn 0x10
|
||||
{ 0x1D, 0xC2 }, // (Offset,Value)-Pair #16
|
||||
{ 0x1E, 0x10 }, // (Offset,Value)-Pair #17
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * Get2DSurfaceDesc
|
||||
// ******************************************************************
|
||||
|
@ -1573,7 +1748,7 @@ SOOVPA<14> IDirect3DTexture8_GetSurfaceLevel2_1_0_4627 =
|
|||
{ 0x04, 0x8B }, // (Offset,Value)-Pair #4
|
||||
{ 0x07, 0x14 }, // (Offset,Value)-Pair #5
|
||||
|
||||
// IDirect3DTexture8_GetSurfaceLevel2+0x04 : lea eax, [esp+0x14]
|
||||
// IDirect3DTexture8_GetSurfaceLevel2+0x08 : lea eax, [esp+0x14]
|
||||
{ 0x08, 0x8D }, // (Offset,Value)-Pair #6
|
||||
{ 0x0B, 0x14 }, // (Offset,Value)-Pair #7
|
||||
|
||||
|
@ -1594,6 +1769,48 @@ SOOVPA<14> IDirect3DTexture8_GetSurfaceLevel2_1_0_4627 =
|
|||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DTexture8_GetSurfaceLevel2B
|
||||
// ******************************************************************
|
||||
SOOVPA<14> IDirect3DTexture8_GetSurfaceLevel2B_1_0_4627 =
|
||||
{
|
||||
0, // Large == 0
|
||||
14, // Count == 14
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3DTexture8_GetSurfaceLevel2B+0x00 : sub esp, 0x0C
|
||||
{ 0x00, 0x83 }, // (Offset,Value)-Pair #1
|
||||
{ 0x01, 0xEC }, // (Offset,Value)-Pair #2
|
||||
{ 0x02, 0x0C }, // (Offset,Value)-Pair #3
|
||||
|
||||
// IDirect3DTexture8_GetSurfaceLevel2B+0x04 : mov esi, [esp+0x14]
|
||||
{ 0x04, 0x8B }, // (Offset,Value)-Pair #4
|
||||
{ 0x07, 0x14 }, // (Offset,Value)-Pair #5
|
||||
|
||||
// IDirect3DTexture8_GetSurfaceLevel2B+0x08 : lea eax, [esp+0x14]
|
||||
{ 0x08, 0x8D }, // (Offset,Value)-Pair #6
|
||||
{ 0x0B, 0x18 }, // (Offset,Value)-Pair #7
|
||||
|
||||
// IDirect3DTexture8_GetSurfaceLevel2B+0x17 : mov edx, [esp+0x24]
|
||||
{ 0x17, 0x8B }, // (Offset,Value)-Pair #8
|
||||
{ 0x1A, 0x24 }, // (Offset,Value)-Pair #9
|
||||
|
||||
// IDirect3DTexture8_GetSurfaceLevel2B+0x1B : lea eax, [esp+0x18]
|
||||
{ 0x1B, 0x8D }, // (Offset,Value)-Pair #10
|
||||
{ 0x1E, 0x18 }, // (Offset,Value)-Pair #11
|
||||
|
||||
// IDirect3DTexture8_GetSurfaceLevel2B+0x29 : call [abs]
|
||||
{ 0x29, 0xE8 }, // (Offset,Value)-Pair #12
|
||||
|
||||
// IDirect3DTexture8_GetSurfaceLevel2B+0x47 : retn 0x08
|
||||
{ 0x45, 0xC2 }, // (Offset,Value)-Pair #13
|
||||
{ 0x46, 0x08 }, // (Offset,Value)-Pair #14
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * D3D8_1_0_4627
|
||||
// ******************************************************************
|
||||
|
@ -1887,6 +2104,16 @@ OOVPATable D3D8_1_0_4627[] =
|
|||
"EmuIDirect3DDevice8_CreateTexture2"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::CreateTexture2B
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_CreateTexture2B_1_0_4627,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_CreateTexture2,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_CreateTexture2B"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetIndices (* unchanged since 4361 *)
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetIndices_1_0_4361,
|
||||
|
@ -2057,6 +2284,16 @@ OOVPATable D3D8_1_0_4627[] =
|
|||
"EmuIDirect3DDevice8_SetRenderState_NormalizeNormals"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetRenderState_NormalizeNormalsB
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetRenderState_NormalizeNormalsB_1_0_4627,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SetRenderState_NormalizeNormals,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_SetRenderState_NormalizeNormalsB"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetRenderState_TextureFactor (* unchanged since 4361 *)
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetRenderState_TextureFactor_1_0_4361,
|
||||
|
@ -2137,6 +2374,16 @@ OOVPATable D3D8_1_0_4627[] =
|
|||
"EmuIDirect3DDevice8_SetRenderState_ZEnable"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetRenderState_ZEnableB
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetRenderState_ZEnableB_1_0_4627,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SetRenderState_ZEnable,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_SetRenderState_ZEnableB"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetRenderState_StencilEnable (* unchanged since 4361 *)
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilEnable_1_0_4361,
|
||||
|
@ -2297,6 +2544,16 @@ OOVPATable D3D8_1_0_4627[] =
|
|||
"EmuIDirect3DVertexBuffer8_Lock2"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DVertexBuffer8::Lock2B
|
||||
{
|
||||
(OOVPA*)&IDirect3DVertexBuffer8_Lock2B_1_0_4627,
|
||||
|
||||
XTL::EmuIDirect3DVertexBuffer8_Lock2,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DVertexBuffer8_Lock2B"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DResource8::Register (* unchanged since 3925 *)
|
||||
{
|
||||
(OOVPA*)&IDirect3DResource8_Register_1_0_3925,
|
||||
|
@ -2385,6 +2642,16 @@ OOVPATable D3D8_1_0_4627[] =
|
|||
"EmuIDirect3DSurface8_LockRect"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DSurface8::LockRectB
|
||||
{
|
||||
(OOVPA*)&IDirect3DSurface8_LockRectB_1_0_4627,
|
||||
|
||||
XTL::EmuIDirect3DSurface8_LockRect,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DSurface8_LockRectB"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DBaseTexture8::GetLevelCount (* unchanged since 4361 *)
|
||||
{
|
||||
(OOVPA*)&IDirect3DBaseTexture8_GetLevelCount_1_0_4361,
|
||||
|
@ -2405,6 +2672,16 @@ OOVPATable D3D8_1_0_4627[] =
|
|||
"EmuIDirect3DTexture8_GetSurfaceLevel2"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DTexture8::GetSurfaceLevel2B
|
||||
{
|
||||
(OOVPA*)&IDirect3DTexture8_GetSurfaceLevel2B_1_0_4627,
|
||||
|
||||
XTL::EmuIDirect3DTexture8_GetSurfaceLevel2,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DTexture8_GetSurfaceLevel2B"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DTexture8::LockRect (* unchanged since 3925 *)
|
||||
{
|
||||
(OOVPA*)&IDirect3DTexture8_LockRect_1_0_3925,
|
||||
|
|
|
@ -32,6 +32,70 @@
|
|||
// *
|
||||
// ******************************************************************
|
||||
|
||||
// ******************************************************************
|
||||
// * SetThreadPriorityBoost
|
||||
// ******************************************************************
|
||||
SOOVPA<10> SetThreadPriorityBoost_1_0_4627 =
|
||||
{
|
||||
0, // Large == 0
|
||||
10, // Count == 10
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// SetThreadPriorityBoost+0x0D : push [ebp+0x08]
|
||||
{ 0x0D, 0xFF }, // (Offset,Value)-Pair #1
|
||||
{ 0x0E, 0x75 }, // (Offset,Value)-Pair #2
|
||||
{ 0x0F, 0x08 }, // (Offset,Value)-Pair #3
|
||||
|
||||
// SetThreadPriorityBoost+0x18 : jl +0x20
|
||||
{ 0x18, 0x7C }, // (Offset,Value)-Pair #4
|
||||
{ 0x19, 0x20 }, // (Offset,Value)-Pair #5
|
||||
|
||||
// SetThreadPriorityBoost+0x1F : setnz al
|
||||
{ 0x1F, 0x0F }, // (Offset,Value)-Pair #6
|
||||
{ 0x20, 0x95 }, // (Offset,Value)-Pair #7
|
||||
{ 0x21, 0xC0 }, // (Offset,Value)-Pair #8
|
||||
|
||||
// SetThreadPriorityBoost+0x2C : mov ecx, [ebp+0x08]
|
||||
{ 0x2C, 0x8B }, // (Offset,Value)-Pair #9
|
||||
{ 0x2D, 0x4D }, // (Offset,Value)-Pair #10
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * GetThreadPriority
|
||||
// ******************************************************************
|
||||
SOOVPA<10> GetThreadPriority_1_0_4627 =
|
||||
{
|
||||
0, // Large == 0
|
||||
10, // Count == 10
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// GetThreadPriority+0x0D : push [ebp+0x08]
|
||||
{ 0x0D, 0xFF }, // (Offset,Value)-Pair #1
|
||||
{ 0x0E, 0x75 }, // (Offset,Value)-Pair #2
|
||||
{ 0x0F, 0x08 }, // (Offset,Value)-Pair #3
|
||||
|
||||
// GetThreadPriority+0x18 : jl +0x2B
|
||||
{ 0x18, 0x7C }, // (Offset,Value)-Pair #4
|
||||
{ 0x19, 0x2B }, // (Offset,Value)-Pair #5
|
||||
|
||||
// GetThreadPriority+0x2F : cmp esi, 0xFFFFFFF0
|
||||
{ 0x2F, 0x83 }, // (Offset,Value)-Pair #6
|
||||
{ 0x30, 0xFE }, // (Offset,Value)-Pair #7
|
||||
{ 0x31, 0xF0 }, // (Offset,Value)-Pair #8
|
||||
|
||||
// GetThreadPriority+0x37 : mov ecx, [ebp+0x08]
|
||||
{ 0x37, 0x8B }, // (Offset,Value)-Pair #9
|
||||
{ 0x38, 0x4D }, // (Offset,Value)-Pair #10
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * RtlFreeHeap
|
||||
// ******************************************************************
|
||||
|
@ -98,6 +162,46 @@ SOOVPA<10> RtlReAllocateHeap_1_0_4627 =
|
|||
// ******************************************************************
|
||||
OOVPATable XAPI_1_0_4627[] =
|
||||
{
|
||||
// SetThreadPriorityBoost
|
||||
{
|
||||
(OOVPA*)&SetThreadPriorityBoost_1_0_4627,
|
||||
|
||||
XTL::EmuSetThreadPriorityBoost,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuSetThreadPriorityBoost"
|
||||
#endif
|
||||
},
|
||||
// SetThreadPriority (* unchanged since 3911 *)
|
||||
{
|
||||
(OOVPA*)&SetThreadPriority_1_0_3911,
|
||||
|
||||
XTL::EmuSetThreadPriority,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuSetThreadPriority"
|
||||
#endif
|
||||
},
|
||||
// GetThreadPriority
|
||||
{
|
||||
(OOVPA*)&GetThreadPriority_1_0_4627,
|
||||
|
||||
XTL::EmuGetThreadPriority,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuGetThreadPriority"
|
||||
#endif
|
||||
},
|
||||
// XRegisterThreadNotifyRoutine (* unchanged since 3911 *)
|
||||
{
|
||||
(OOVPA*)&XRegisterThreadNotifyRoutine_1_0_3911,
|
||||
|
||||
XTL::EmuXRegisterThreadNotifyRoutine,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuXRegisterThreadNotifyRoutine"
|
||||
#endif
|
||||
},
|
||||
// RtlCreateHeap (* unchanged since 1.0.4361 *) (* OR FARTHER *)
|
||||
{
|
||||
(OOVPA*)&RtlCreateHeap_1_0_3911,
|
||||
|
|
|
@ -288,7 +288,7 @@ extern "C" CXBXKRNL_API uint32 KernelThunkTable[367] =
|
|||
(uint32)PANIC(0x00E4), // 0x00E4 (228)
|
||||
(uint32)PANIC(0x00E5), // 0x00E5 (229)
|
||||
(uint32)PANIC(0x00E6), // 0x00E6 (230)
|
||||
(uint32)PANIC(0x00E7), // 0x00E7 (231)
|
||||
(uint32)&xboxkrnl::NtSuspendThread, // 0x00E7 (231)
|
||||
(uint32)&xboxkrnl::NtUserIoApcDispatcher, // 0x00E8 (232)
|
||||
(uint32)PANIC(0x00E9), // 0x00E9 (233)
|
||||
(uint32)&xboxkrnl::NtWaitForSingleObjectEx, // 0x00EA (234)
|
||||
|
|
Loading…
Reference in New Issue