redid pushbuffers,4432+4361+etc
This commit is contained in:
parent
fcc2844fe3
commit
c25862b27e
|
@ -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
|
||||
|
|
|
@ -154,6 +154,15 @@ HRESULT WINAPI EmuIDirect3D8_EnumAdapterModes
|
|||
// ******************************************************************
|
||||
VOID WINAPI EmuIDirect3D8_KickOffAndWaitForIdle();
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuIDirect3D8_SetGammaRamp
|
||||
// ******************************************************************
|
||||
VOID WINAPI EmuIDirect3D8_SetGammaRamp
|
||||
(
|
||||
DWORD dwFlags,
|
||||
CONST X_D3DGAMMARAMP *pRamp
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuIDirect3DDevice8_AddRef
|
||||
// ******************************************************************
|
||||
|
@ -228,6 +237,14 @@ HRESULT WINAPI EmuIDirect3DDevice8_SetViewport
|
|||
CONST D3DVIEWPORT8 *pViewport
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuIDirect3DDevice8_GetViewport
|
||||
// ******************************************************************
|
||||
HRESULT WINAPI EmuIDirect3DDevice8_GetViewport
|
||||
(
|
||||
D3DVIEWPORT8 *pViewport
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuIDirect3DDevice8_SetShaderConstantMode
|
||||
// ******************************************************************
|
||||
|
|
|
@ -94,6 +94,14 @@ typedef struct _X_D3DPRESENT_PARAMETERS
|
|||
}
|
||||
X_D3DPRESENT_PARAMETERS;
|
||||
|
||||
typedef struct _X_D3DGAMMARAMP
|
||||
{
|
||||
BYTE red[256];
|
||||
BYTE green[256];
|
||||
BYTE blue[256];
|
||||
}
|
||||
X_D3DGAMMARAMP;
|
||||
|
||||
struct X_D3DVertexShader
|
||||
{
|
||||
union
|
||||
|
|
|
@ -1119,7 +1119,9 @@ static void EmuInstallWrappers(OOVPATable *OovpaTable, uint32 OovpaTableSize, vo
|
|||
|
||||
if(pFunc != 0)
|
||||
{
|
||||
#ifdef _DEBUG_TRACE
|
||||
DbgPrintf("EmuMain (0x%X): 0x%.08X -> %s\n", GetCurrentThreadId(), pFunc, OovpaTable[a].szFuncName);
|
||||
#endif
|
||||
|
||||
if(OovpaTable[a].lpRedirect == 0)
|
||||
EmuInstallWrapper(pFunc, EmuXRefFailure);
|
||||
|
|
|
@ -1280,6 +1280,47 @@ VOID WINAPI XTL::EmuIDirect3D8_KickOffAndWaitForIdle()
|
|||
return;
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuIDirect3D8_SetGammaRamp
|
||||
// ******************************************************************
|
||||
VOID WINAPI XTL::EmuIDirect3D8_SetGammaRamp
|
||||
(
|
||||
DWORD dwFlags,
|
||||
CONST X_D3DGAMMARAMP *pRamp
|
||||
)
|
||||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// debug trace
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuD3D8 (0x%X): EmuIDirect3D8_SetGammaRamp\n"
|
||||
"(\n"
|
||||
" dwFlags : 0x%.08X\n"
|
||||
" pRamp : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), dwFlags, pRamp);
|
||||
}
|
||||
#endif
|
||||
|
||||
// remove D3DSGR_IMMEDIATE
|
||||
DWORD dwPCFlags = dwFlags & (~0x00000002);
|
||||
D3DGAMMARAMP PCRamp;
|
||||
|
||||
for(int v=0;v<255;v++)
|
||||
{
|
||||
PCRamp.red[v] = pRamp->red[v];
|
||||
PCRamp.green[v] = pRamp->green[v];
|
||||
PCRamp.blue[v] = pRamp->blue[v];
|
||||
}
|
||||
|
||||
g_pD3DDevice8->SetGammaRamp(dwPCFlags, &PCRamp);
|
||||
|
||||
EmuSwapFS(); // XBox FS
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuIDirect3DDevice8_AddRef
|
||||
// ******************************************************************
|
||||
|
@ -1620,6 +1661,40 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetViewport
|
|||
return hRet;
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuIDirect3DDevice8_GetViewport
|
||||
// ******************************************************************
|
||||
HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetViewport
|
||||
(
|
||||
D3DVIEWPORT8 *pViewport
|
||||
)
|
||||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// debug trace
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetViewport\n"
|
||||
"(\n"
|
||||
" pViewport : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), pViewport);
|
||||
}
|
||||
#endif
|
||||
|
||||
HRESULT hRet = g_pD3DDevice8->GetViewport(pViewport);
|
||||
|
||||
if(FAILED(hRet))
|
||||
{
|
||||
EmuWarning("Unable to get viewport!");
|
||||
hRet = D3D_OK;
|
||||
}
|
||||
|
||||
EmuSwapFS(); // Xbox FS
|
||||
|
||||
return hRet;
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuIDirect3DDevice8_SetShaderConstantMode
|
||||
// ******************************************************************
|
||||
|
|
|
@ -122,6 +122,12 @@ XTL::X_D3DFORMAT XTL::EmuPC2XB_D3DFormat(D3DFORMAT Format)
|
|||
return 0x05;
|
||||
case D3DFMT_D24S8:
|
||||
return 0x2A;
|
||||
case D3DFMT_DXT3:
|
||||
return 0x0F;
|
||||
case D3DFMT_DXT2:
|
||||
return 0x0E;
|
||||
case D3DFMT_DXT1:
|
||||
return 0x0C;
|
||||
case D3DFMT_X8R8G8B8:
|
||||
// return 0x1E; // Linear (X_D3DFMT_LIN_X8R8G8B8)
|
||||
return 0x07;
|
||||
|
|
|
@ -53,122 +53,83 @@ void XTL::EmuExecutePushBuffer
|
|||
{
|
||||
DWORD *pdwPushData = (DWORD*)pPushBuffer->Data;
|
||||
|
||||
DWORD dwIndices = 0, dwBytes = 0;
|
||||
PVOID pIndexData = 0;
|
||||
|
||||
D3DPRIMITIVETYPE PCPrimitiveType = (D3DPRIMITIVETYPE)-1;
|
||||
X_D3DPRIMITIVETYPE XBPrimitiveType = -1;
|
||||
|
||||
while((DWORD)pdwPushData < ((DWORD)pPushBuffer->Data + pPushBuffer->Size))
|
||||
while(true)
|
||||
{
|
||||
DWORD dwCount = (*pdwPushData >> 18);
|
||||
DWORD dwMethod = (*pdwPushData & 0x3FFFF);
|
||||
|
||||
// Interpret GPU Instruction
|
||||
switch(*pdwPushData++)
|
||||
if(dwMethod == 0x000017FC) // NVPB_SetBeginEnd
|
||||
{
|
||||
// NVPB_DrawVertices
|
||||
case 0x000417FC:
|
||||
pdwPushData++;
|
||||
|
||||
if(*pdwPushData == 0)
|
||||
break; // done?
|
||||
else
|
||||
{
|
||||
if(*pdwPushData == 0)
|
||||
{
|
||||
pdwPushData++;
|
||||
|
||||
// Null instruction
|
||||
if( (*pdwPushData) == 0x00000000)
|
||||
{
|
||||
pdwPushData++;
|
||||
}
|
||||
// Skip Bytes
|
||||
else if( (*pdwPushData & 0x40000100) == 0x40000100)
|
||||
{
|
||||
DWORD dwSkipBytes = (*pdwPushData & 0x1FFF0000) >> 16;
|
||||
|
||||
// advance to argument
|
||||
pdwPushData++;
|
||||
|
||||
// argument doesnt matter
|
||||
pdwPushData++;
|
||||
|
||||
// skip over given data
|
||||
pdwPushData += dwSkipBytes/4;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
XBPrimitiveType = *pdwPushData++;
|
||||
PCPrimitiveType = EmuPrimitiveType(XBPrimitiveType);
|
||||
|
||||
if( (*pdwPushData & 0x40001800) != 0x40001800)
|
||||
{
|
||||
EmuCleanup("Error in PushBuffer interpretter");
|
||||
}
|
||||
|
||||
// Parse Index Data
|
||||
while( (*pdwPushData & 0x40001800) == 0x40001800)
|
||||
{
|
||||
dwBytes = ((*pdwPushData & 0x1FFF0000) >> 16);
|
||||
|
||||
if(PCPrimitiveType == D3DPT_TRIANGLESTRIP)
|
||||
dwIndices = dwBytes/2;
|
||||
|
||||
// argument doesnt matter
|
||||
pdwPushData++;
|
||||
|
||||
// assign index data buffer
|
||||
pIndexData = (PVOID)pdwPushData;
|
||||
|
||||
// advance past index data
|
||||
pdwPushData += dwBytes/4;
|
||||
|
||||
LPDIRECT3DINDEXBUFFER8 pIndexBuffer=0;
|
||||
|
||||
HRESULT hRet = g_pD3DDevice8->CreateIndexBuffer(dwBytes, 0, D3DFMT_INDEX16, D3DPOOL_MANAGED, &pIndexBuffer);
|
||||
|
||||
if(FAILED(hRet))
|
||||
EmuCleanup("Unable to create index buffer for PushBuffer emulation\n");
|
||||
|
||||
// copy index data
|
||||
{
|
||||
WORD *pData=0;
|
||||
|
||||
pIndexBuffer->Lock(0, dwBytes, (UCHAR**)&pData, NULL);
|
||||
|
||||
memcpy(pData, pIndexData, dwBytes);
|
||||
|
||||
pIndexBuffer->Unlock();
|
||||
}
|
||||
|
||||
// render indexed vertices
|
||||
{
|
||||
g_pD3DDevice8->SetIndices(pIndexBuffer, 0);
|
||||
|
||||
g_pD3DDevice8->DrawIndexedPrimitive
|
||||
(
|
||||
PCPrimitiveType, 0, dwIndices, 0, EmuD3DVertex2PrimitiveCount(XBPrimitiveType, dwIndices)
|
||||
);
|
||||
}
|
||||
|
||||
// cleanup
|
||||
pIndexBuffer->Release();
|
||||
|
||||
}
|
||||
}
|
||||
XBPrimitiveType = *pdwPushData;
|
||||
PCPrimitiveType = EmuPrimitiveType(XBPrimitiveType);
|
||||
}
|
||||
break;
|
||||
|
||||
// NVPB_Unknown
|
||||
case 0x00041808:
|
||||
{
|
||||
WORD wUnknown = (WORD)*pdwPushData++;
|
||||
|
||||
// EmuCleanup("GPU Instruction Mask 0x00041808 Unhandled (D3DDevice_DrawIndexedVertices)");
|
||||
}
|
||||
break;
|
||||
|
||||
// NVPB_Unknown
|
||||
default:
|
||||
{
|
||||
EmuCleanup("GPU Instruction Mask 0x%.08X Unhandled", *(pdwPushData-1));
|
||||
}
|
||||
break;
|
||||
}
|
||||
else // NVPB_InlineArray
|
||||
{
|
||||
PVOID pIndexData = 0;
|
||||
BOOL bInc = *pdwPushData & 0x40000000;
|
||||
|
||||
BOOL bFix = (dwMethod != 0x00001818);
|
||||
|
||||
if(bFix)
|
||||
{
|
||||
if(bInc)
|
||||
dwCount = ((*pdwPushData - (0x40000000 | 0x00001818)) >> 18);
|
||||
|
||||
dwMethod = 0x1818;
|
||||
}
|
||||
|
||||
pdwPushData++;
|
||||
|
||||
pIndexData = pdwPushData;
|
||||
|
||||
pdwPushData += dwCount - (bInc ? 0 : 1);
|
||||
|
||||
// perform rendering
|
||||
{
|
||||
LPDIRECT3DINDEXBUFFER8 pIndexBuffer=0;
|
||||
|
||||
HRESULT hRet = g_pD3DDevice8->CreateIndexBuffer(dwCount*4, 0, D3DFMT_INDEX16, D3DPOOL_MANAGED, &pIndexBuffer);
|
||||
|
||||
if(FAILED(hRet))
|
||||
EmuCleanup("Unable to create index buffer for PushBuffer emulation\n");
|
||||
|
||||
// copy index data
|
||||
{
|
||||
WORD *pData=0;
|
||||
|
||||
pIndexBuffer->Lock(0, dwCount*4, (UCHAR**)&pData, NULL);
|
||||
|
||||
memcpy(pData, pIndexData, dwCount*4);
|
||||
|
||||
pIndexBuffer->Unlock();
|
||||
}
|
||||
|
||||
// render indexed vertices
|
||||
{
|
||||
g_pD3DDevice8->SetIndices(pIndexBuffer, 0);
|
||||
|
||||
g_pD3DDevice8->DrawIndexedPrimitive
|
||||
(
|
||||
PCPrimitiveType, 0, dwCount*2, 0, EmuD3DVertex2PrimitiveCount(XBPrimitiveType, dwCount*2)
|
||||
);
|
||||
}
|
||||
|
||||
// cleanup
|
||||
pIndexBuffer->Release();
|
||||
}
|
||||
}
|
||||
|
||||
pdwPushData++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -293,6 +293,19 @@ XBSYSAPI EXPORTNUM(24) NTSTATUS NTAPI xboxkrnl::ExQueryNonVolatileSetting
|
|||
}
|
||||
break;
|
||||
|
||||
// Audio Flags
|
||||
case 0x009:
|
||||
{
|
||||
if(Type != 0)
|
||||
*Type = 0x04;
|
||||
|
||||
if(Value != 0)
|
||||
*Value = 0;
|
||||
|
||||
if(ResultLength != 0)
|
||||
*ResultLength = 0x04;
|
||||
}
|
||||
|
||||
case EEPROM_MISC:
|
||||
{
|
||||
if(Type != 0)
|
||||
|
|
|
@ -161,6 +161,98 @@ SOOVPA<10> IDirect3D8_EnumAdapterModes_1_0_4361 =
|
|||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_LoadVertexShader
|
||||
// ******************************************************************
|
||||
SOOVPA<10> IDirect3DDevice8_LoadVertexShader_1_0_4361 =
|
||||
{
|
||||
0, // Large == 0
|
||||
10, // Count == 10
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3DDevice8_LoadVertexShader+0x07 : mov al, [ebx+0x08]
|
||||
{ 0x07, 0x8A }, // (Offset,Value)-Pair #1
|
||||
{ 0x08, 0x43 }, // (Offset,Value)-Pair #2
|
||||
{ 0x09, 0x08 }, // (Offset,Value)-Pair #3
|
||||
|
||||
// IDirect3DDevice8_LoadVertexShader+0x32 : mov dword ptr [eax], 0x00041E9C
|
||||
{ 0x32, 0xC7 }, // (Offset,Value)-Pair #4
|
||||
{ 0x33, 0x00 }, // (Offset,Value)-Pair #5
|
||||
{ 0x34, 0x9C }, // (Offset,Value)-Pair #6
|
||||
{ 0x35, 0x1E }, // (Offset,Value)-Pair #7
|
||||
{ 0x36, 0x04 }, // (Offset,Value)-Pair #8
|
||||
|
||||
// IDirect3DDevice8_LoadVertexShader+0x4E : mov [ebx], ebx
|
||||
{ 0x4E, 0x89 }, // (Offset,Value)-Pair #9
|
||||
{ 0x4F, 0x13 }, // (Offset,Value)-Pair #10
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_SelectVertexShader
|
||||
// ******************************************************************
|
||||
SOOVPA<11> IDirect3DDevice8_SelectVertexShader_1_0_4361 =
|
||||
{
|
||||
0, // Large == 0
|
||||
11, // Count == 11
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3DDevice8_SelectVertexShader+0x13 : mov [esi+0x384], eax
|
||||
{ 0x13, 0x89 }, // (Offset,Value)-Pair #1
|
||||
{ 0x14, 0x86 }, // (Offset,Value)-Pair #2
|
||||
{ 0x15, 0x84 }, // (Offset,Value)-Pair #3
|
||||
{ 0x16, 0x03 }, // (Offset,Value)-Pair #4
|
||||
|
||||
// IDirect3DDevice8_SelectVertexShader+0x3B : mov dword ptr [eax], 0x00081E94
|
||||
{ 0x3B, 0xC7 }, // (Offset,Value)-Pair #5
|
||||
{ 0x3C, 0x00 }, // (Offset,Value)-Pair #6
|
||||
{ 0x3D, 0x94 }, // (Offset,Value)-Pair #7
|
||||
{ 0x3E, 0x1E }, // (Offset,Value)-Pair #8
|
||||
{ 0x3F, 0x08 }, // (Offset,Value)-Pair #9
|
||||
|
||||
// IDirect3DDevice8_SelectVertexShader+0x55 : mov [esi], eax
|
||||
{ 0x55, 0x89 }, // (Offset,Value)-Pair #10
|
||||
{ 0x56, 0x06 }, // (Offset,Value)-Pair #11
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_SetRenderTarget
|
||||
// ******************************************************************
|
||||
SOOVPA<9> IDirect3DDevice8_SetRenderTarget_1_0_4361 =
|
||||
{
|
||||
0, // Large == 0
|
||||
9, // Count == 9
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3DDevice8_SetRenderTarget+0x00 : sub esp, 0x3C
|
||||
{ 0x00, 0x83 }, // (Offset,Value)-Pair #1
|
||||
{ 0x01, 0xEC }, // (Offset,Value)-Pair #2
|
||||
{ 0x02, 0x3C }, // (Offset,Value)-Pair #3
|
||||
|
||||
// IDirect3DDevice8_SetRenderTarget+014 : jnz +0x0C
|
||||
{ 0x14, 0x75 }, // (Offset,Value)-Pair #4
|
||||
{ 0x15, 0x0C }, // (Offset,Value)-Pair #5
|
||||
|
||||
// IDirect3DDevice8_SetRenderTarget+0x44 : push ebp
|
||||
{ 0x44, 0x55 }, // (Offset,Value)-Pair #6
|
||||
|
||||
// IDirect3DDevice8_SetRenderTarget+0x79 : shr ecx, 0x14
|
||||
{ 0x79, 0xC1 }, // (Offset,Value)-Pair #7
|
||||
{ 0x7A, 0xE9 }, // (Offset,Value)-Pair #8
|
||||
{ 0x7B, 0x14 }, // (Offset,Value)-Pair #9
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_AddRef
|
||||
// ******************************************************************
|
||||
|
@ -252,6 +344,35 @@ SOOVPA<10> IDirect3D_RecordStateBlock_1_0_4361 =
|
|||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3D_SetGammaRamp
|
||||
// ******************************************************************
|
||||
SOOVPA<9> IDirect3D_SetGammaRamp_1_0_4361 =
|
||||
{
|
||||
0, // Large == 0
|
||||
9, // Count == 9
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3D_SetGammaRamp+0x11 : and eax, 1; push ebx
|
||||
{ 0x11, 0x83 }, // (Offset,Value)-Pair #1
|
||||
{ 0x12, 0xE0 }, // (Offset,Value)-Pair #2
|
||||
{ 0x13, 0x01 }, // (Offset,Value)-Pair #3
|
||||
{ 0x14, 0x53 }, // (Offset,Value)-Pair #4
|
||||
|
||||
// IDirect3D_SetGammaRamp+0x2F : rep movsd
|
||||
{ 0x2F, 0xF3 }, // (Offset,Value)-Pair #5
|
||||
{ 0x30, 0xA5 }, // (Offset,Value)-Pair #6
|
||||
|
||||
// IDirect3D_SetGammaRamp+0x3E : push ebx; mov ecx, edx
|
||||
{ 0x3E, 0x53 }, // (Offset,Value)-Pair #7
|
||||
{ 0x3F, 0x8B }, // (Offset,Value)-Pair #8
|
||||
{ 0x40, 0xCA }, // (Offset,Value)-Pair #9
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_BeginStateBlock
|
||||
// ******************************************************************
|
||||
|
@ -615,6 +736,141 @@ SOOVPA<10> IDirect3DDevice8_SetPixelShader_1_0_4361 =
|
|||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_SetViewport
|
||||
// ******************************************************************
|
||||
SOOVPA<10> IDirect3DDevice8_SetViewport_1_0_4361 =
|
||||
{
|
||||
0, // Large == 0
|
||||
10, // Count == 10
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3DDevice8_SetViewport+0x00 : sub esp, 0x08
|
||||
{ 0x00, 0x83 }, // (Offset,Value)-Pair #1
|
||||
{ 0x01, 0xEC }, // (Offset,Value)-Pair #2
|
||||
{ 0x02, 0x08 }, // (Offset,Value)-Pair #3
|
||||
|
||||
// IDirect3DDevice8_SetViewport+0x2F : mov ebx, [esp+0x14]
|
||||
{ 0x2D, 0x8B }, // (Offset,Value)-Pair #4
|
||||
{ 0x2E, 0x5C }, // (Offset,Value)-Pair #5
|
||||
{ 0x2F, 0x24 }, // (Offset,Value)-Pair #6
|
||||
{ 0x30, 0x14 }, // (Offset,Value)-Pair #7
|
||||
|
||||
// IDirect3DDevice8_SetViewport+0x53 : jnz +0x12
|
||||
{ 0x53, 0x75 }, // (Offset,Value)-Pair #8
|
||||
{ 0x54, 0x12 }, // (Offset,Value)-Pair #9
|
||||
|
||||
// IDirect3DDevice8_SetViewport+0x9B : inc edx
|
||||
{ 0x9B, 0x42 }, // (Offset,Value)-Pair #10
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_GetViewport
|
||||
// ******************************************************************
|
||||
SOOVPA<10> IDirect3DDevice8_GetViewport_1_0_4361 =
|
||||
{
|
||||
0, // Large == 0
|
||||
10, // Count == 10
|
||||
|
||||
-1, // XRef Not Saved
|
||||
0, // XRef Not Used
|
||||
|
||||
{
|
||||
// IDirect3DDevice8_GetViewport+0x05 : push esi; push edi
|
||||
{ 0x05, 0x56 }, // (Offset,Value)-Pair #1
|
||||
{ 0x06, 0x57 }, // (Offset,Value)-Pair #2
|
||||
|
||||
// IDirect3DDevice8_GetViewport+0x0B : lea esi, [eax+0x9D0]
|
||||
{ 0x0B, 0x8D }, // (Offset,Value)-Pair #3
|
||||
{ 0x0C, 0xB0 }, // (Offset,Value)-Pair #4
|
||||
{ 0x0D, 0xD0 }, // (Offset,Value)-Pair #5
|
||||
{ 0x0E, 0x09 }, // (Offset,Value)-Pair #6
|
||||
|
||||
// IDirect3DDevice8_GetViewport+0x11 : mov ecx, 6
|
||||
{ 0x11, 0xB9 }, // (Offset,Value)-Pair #7
|
||||
{ 0x12, 0x06 }, // (Offset,Value)-Pair #8
|
||||
|
||||
// IDirect3DDevice8_GetViewport+0x1A : retn 0x04
|
||||
{ 0x1A, 0xC2 }, // (Offset,Value)-Pair #9
|
||||
{ 0x1B, 0x04 }, // (Offset,Value)-Pair #10
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_SetTextureState_BumpEnv
|
||||
// ******************************************************************
|
||||
SOOVPA<12> IDirect3DDevice8_SetTextureState_BumpEnv_1_0_4361 =
|
||||
{
|
||||
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_4361 =
|
||||
{
|
||||
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_SetIndices
|
||||
// ******************************************************************
|
||||
|
@ -1802,6 +2058,36 @@ OOVPATable D3D8_1_0_4361[] =
|
|||
"EmuIDirect3D8_EnumAdapterModes"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::LoadVertexShader
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_LoadVertexShader_1_0_4361,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_LoadVertexShader,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_LoadVertexShader"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SelectVertexShader
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SelectVertexShader_1_0_4361,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SelectVertexShader,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_SelectVertexShader"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetRenderTarget
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetRenderTarget_1_0_4361,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SetRenderTarget,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_SetRenderTarget"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::AddRef
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_AddRef_1_0_4361,
|
||||
|
@ -1820,6 +2106,16 @@ OOVPATable D3D8_1_0_4361[] =
|
|||
"EmuIDirect3D_ClearStateBlockFlags (XREF)"
|
||||
#endif
|
||||
},
|
||||
// IDirect3D::SetGammaRamp
|
||||
{
|
||||
(OOVPA*)&IDirect3D_SetGammaRamp_1_0_4361,
|
||||
|
||||
XTL::EmuIDirect3D8_SetGammaRamp,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3D_SetGammaRamp"
|
||||
#endif
|
||||
},
|
||||
// IDirect3D::RecordStateBlock
|
||||
{
|
||||
(OOVPA*)&IDirect3D_RecordStateBlock_1_0_4361, 0,
|
||||
|
@ -1958,6 +2254,46 @@ OOVPATable D3D8_1_0_4361[] =
|
|||
"EmuIDirect3DDevice8_SetPixelShader"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetViewport
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetViewport_1_0_4361,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SetViewport,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_SetViewport"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::GetViewport
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_GetViewport_1_0_4361,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_GetViewport,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_GetViewport"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetTextureState_BumpEnv
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetTextureState_BumpEnv_1_0_4361,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SetTextureState_BumpEnv,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_SetTextureState_BumpEnv"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetTextureState_BorderColor
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetTextureState_BorderColor_1_0_4361,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SetTextureState_BorderColor,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_SetTextureState_BorderColor"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::CreateTexture (* unchanged since 3925 *)
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_CreateTexture_1_0_3925,
|
||||
|
|
|
@ -168,40 +168,6 @@ SOOVPA<10> IDirect3DDevice8_SetPixelShader_1_0_4432 =
|
|||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_SetTextureState_BumpEnv
|
||||
// ******************************************************************
|
||||
SOOVPA<12> IDirect3DDevice8_SetTextureState_BumpEnv_1_0_4432 =
|
||||
{
|
||||
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_TwoSidedLighting
|
||||
// ******************************************************************
|
||||
|
@ -272,43 +238,6 @@ SOOVPA<13> IDirect3DDevice8_SetTextureState_BackFillMode_1_0_4432 =
|
|||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * IDirect3DDevice8_SetTextureState_BorderColor
|
||||
// ******************************************************************
|
||||
SOOVPA<15> IDirect3DDevice8_SetTextureState_BorderColor_1_0_4432 =
|
||||
{
|
||||
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_SetTextureState_ColorKeyColor
|
||||
// ******************************************************************
|
||||
|
@ -1040,9 +969,9 @@ OOVPATable D3D8_1_0_4432[] =
|
|||
"EmuIDirect3DDevice8_EnableOverlay"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetTextureState_BumpEnv
|
||||
// IDirect3DDevice8::SetTextureState_BumpEnv (* unchanged since 4361 *)
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetTextureState_BumpEnv_1_0_4432,
|
||||
(OOVPA*)&IDirect3DDevice8_SetTextureState_BumpEnv_1_0_4361,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SetTextureState_BumpEnv,
|
||||
|
||||
|
@ -1070,9 +999,9 @@ OOVPATable D3D8_1_0_4432[] =
|
|||
"EmuIDirect3DDevice8_SetTextureState_BackFillMode"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetTextureState_BorderColor
|
||||
// IDirect3DDevice8::SetTextureState_BorderColor (* unchanged since 4361 *)
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetTextureState_BorderColor_1_0_4432,
|
||||
(OOVPA*)&IDirect3DDevice8_SetTextureState_BorderColor_1_0_4361,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SetTextureState_BorderColor,
|
||||
|
||||
|
|
|
@ -1975,9 +1975,9 @@ OOVPATable D3D8_1_0_4627[] =
|
|||
"EmuIDirect3DDevice8_SetTextureState_TexCoordIndex"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetTextureState_BumpEnv (* unchanged since 4432 *)
|
||||
// IDirect3DDevice8::SetTextureState_BumpEnv (* unchanged since 4361 *)
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetTextureState_BumpEnv_1_0_4432,
|
||||
(OOVPA*)&IDirect3DDevice8_SetTextureState_BumpEnv_1_0_4361,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SetTextureState_BumpEnv,
|
||||
|
||||
|
@ -1985,9 +1985,9 @@ OOVPATable D3D8_1_0_4627[] =
|
|||
"EmuIDirect3DDevice8_SetTextureState_BumpEnv"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetTextureState_BorderColor (* unchanged since 4432 *)
|
||||
// IDirect3DDevice8::SetTextureState_BorderColor (* unchanged since 4361 *)
|
||||
{
|
||||
(OOVPA*)&IDirect3DDevice8_SetTextureState_BorderColor_1_0_4432,
|
||||
(OOVPA*)&IDirect3DDevice8_SetTextureState_BorderColor_1_0_4361,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SetTextureState_BorderColor,
|
||||
|
||||
|
|
Loading…
Reference in New Issue