Random updates
This commit is contained in:
parent
511ba86290
commit
3e65aa93c9
|
@ -751,4 +751,10 @@ _ Added the following kernel function(s)
|
|||
Direct3D_EnumAdapterModes (5233-5344)
|
||||
D3DDevice_SetVerticalBlankCallback (5455)
|
||||
D3DDevice_GetProjection
|
||||
|
||||
4/21/10
|
||||
- Added the following function(s)
|
||||
D3DDevice_GetModelView (5558)
|
||||
D3DDevice_SetBackMaterial (5558)
|
||||
D3DDevice_SetRenderState_TwoSidedLighting (5558)
|
||||
|
|
@ -9450,7 +9450,52 @@ void WINAPI XTL::EmuXMETAL_StartPush(void* Unknown)
|
|||
");\n", GetCurrentThreadId(), Unknown);
|
||||
|
||||
// This function is too low level to actually emulate
|
||||
// Only use for debugging.
|
||||
__asm int 3;
|
||||
|
||||
EmuSwapFS(); // Xbox FS
|
||||
}
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuIDirect3DDevice8_GetModelView
|
||||
// ******************************************************************
|
||||
HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetModelView(D3DXMATRIX* pModelView)
|
||||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetModelView\n"
|
||||
"(\n"
|
||||
" pModelView : 0x%.08X\n"
|
||||
");\n", GetCurrentThreadId(), pModelView);
|
||||
|
||||
D3DXMATRIX mtxWorld, mtxView;
|
||||
|
||||
// I hope this is right
|
||||
g_pD3DDevice8->GetTransform( D3DTS_WORLD, &mtxWorld );
|
||||
g_pD3DDevice8->GetTransform( D3DTS_VIEW, &mtxView );
|
||||
|
||||
*pModelView = mtxWorld * mtxView;
|
||||
|
||||
EmuSwapFS(); // Xbox FS
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuIDirect3DDevice8_SetBackMaterial
|
||||
// ******************************************************************
|
||||
HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetBackMaterial(D3DMATERIAL8* pMaterial)
|
||||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetBackMaterial\n"
|
||||
"(\n"
|
||||
" pMaterial : 0x%.08X\n"
|
||||
");\n", GetCurrentThreadId(), pMaterial);
|
||||
|
||||
EmuWarning("SetBackMaterial is not supported!");
|
||||
|
||||
EmuSwapFS(); // Xbox FS
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -1829,4 +1829,14 @@ HRESULT WINAPI EmuIDirect3DDevice8_EndPushBuffer();
|
|||
// ******************************************************************
|
||||
void WINAPI EmuXMETAL_StartPush(void* Unknown);
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuIDirect3DDevice8_GetModelView
|
||||
// ******************************************************************
|
||||
HRESULT WINAPI EmuIDirect3DDevice8_GetModelView(D3DXMATRIX* pModelView);
|
||||
|
||||
// ******************************************************************
|
||||
// * func: EmuIDirect3DDevice8_SetBackMaterial
|
||||
// ******************************************************************
|
||||
HRESULT WINAPI EmuIDirect3DDevice8_SetBackMaterial(D3DMATERIAL8* pMaterial);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1643,13 +1643,16 @@ HRESULT WINAPI XTL::EmuDirectSoundCreateStream
|
|||
return DS_OK;
|
||||
}
|
||||
|
||||
// we only support 2 channels right now
|
||||
if(pDSBufferDesc->lpwfxFormat->nChannels > 2)
|
||||
{
|
||||
pDSBufferDesc->lpwfxFormat->nChannels = 2;
|
||||
pDSBufferDesc->lpwfxFormat->nBlockAlign = (2*pDSBufferDesc->lpwfxFormat->wBitsPerSample)/8;
|
||||
pDSBufferDesc->lpwfxFormat->nAvgBytesPerSec = pDSBufferDesc->lpwfxFormat->nSamplesPerSec * pDSBufferDesc->lpwfxFormat->nBlockAlign;
|
||||
}
|
||||
if(pDSBufferDesc->lpwfxFormat != NULL)
|
||||
{
|
||||
// we only support 2 channels right now
|
||||
if(pDSBufferDesc->lpwfxFormat->nChannels > 2)
|
||||
{
|
||||
pDSBufferDesc->lpwfxFormat->nChannels = 2;
|
||||
pDSBufferDesc->lpwfxFormat->nBlockAlign = (2*pDSBufferDesc->lpwfxFormat->wBitsPerSample)/8;
|
||||
pDSBufferDesc->lpwfxFormat->nAvgBytesPerSec = pDSBufferDesc->lpwfxFormat->nSamplesPerSec * pDSBufferDesc->lpwfxFormat->nBlockAlign;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(*ppStream)->EmuBuffer = 0;
|
||||
|
|
|
@ -1093,6 +1093,75 @@ SOOVPA<7> IDirect3DDevice8_GetProjectionViewportMatrix_1_0_5455 =
|
|||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * D3DDevice_GetModelView
|
||||
// ******************************************************************
|
||||
SOOVPA<7> D3DDevice_GetModelView_1_0_5558 =
|
||||
{
|
||||
0, // Large == 0
|
||||
7, // Count == 7
|
||||
|
||||
-1, // Xref Not Saved
|
||||
0, // Xref Not Used
|
||||
|
||||
{
|
||||
{ 0x05, 0x57 },
|
||||
{ 0x0A, 0x85 },
|
||||
{ 0x10, 0xB0 },
|
||||
{ 0x16, 0x10 },
|
||||
{ 0x1C, 0x5E },
|
||||
{ 0x22, 0xC1 },
|
||||
{ 0x28, 0xE0 },
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * D3DDevice_SetBackMaterial
|
||||
// ******************************************************************
|
||||
SOOVPA<9> D3DDevice_SetBackMaterial_1_0_5558 =
|
||||
{
|
||||
0, // Large == 0
|
||||
9, // Count == 9
|
||||
|
||||
-1, // Xref Not Saved
|
||||
0, // Xref Not Used
|
||||
|
||||
{
|
||||
{ 0x04, 0x08 },
|
||||
{ 0x0C, 0x81 },
|
||||
{ 0x0E, 0x34 },
|
||||
{ 0x10, 0x00 },
|
||||
{ 0x16, 0x00 },
|
||||
{ 0x1F, 0x81 },
|
||||
{ 0x22, 0x90 },
|
||||
{ 0x2C, 0x5E },
|
||||
{ 0x2E, 0x04 },
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * D3DDevice_SetRenderState_TwoSidedLighting
|
||||
// ******************************************************************
|
||||
SOOVPA<8> D3DDevice_SetRenderState_TwoSidedLighting_1_0_5558 =
|
||||
{
|
||||
0, // Large == 0
|
||||
8, // Count == 8
|
||||
|
||||
-1, // Xref Not Saved
|
||||
0, // Xref Not Used
|
||||
|
||||
{
|
||||
{ 0x0E, 0x05 },
|
||||
{ 0x1E, 0x89 },
|
||||
{ 0x30, 0x00 },
|
||||
{ 0x40, 0x89 },
|
||||
{ 0x52, 0x8B },
|
||||
{ 0x60, 0x75 },
|
||||
{ 0x6E, 0x48 },
|
||||
{ 0x7E, 0x04 },
|
||||
}
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
// * D3D8_1_0_5558
|
||||
// ******************************************************************
|
||||
|
@ -2106,6 +2175,36 @@ OOVPATable D3D8_1_0_5558[] =
|
|||
"EmuIDirect3DDevice8_GetProjectionViewportMatrix (5455)"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::GetModelView
|
||||
{
|
||||
(OOVPA*)&D3DDevice_GetModelView_1_0_5558,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_GetModelView,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_GetModelView"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetBackMaterial
|
||||
{
|
||||
(OOVPA*)&D3DDevice_SetBackMaterial_1_0_5558,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SetBackMaterial,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_SetBackMaterial"
|
||||
#endif
|
||||
},
|
||||
// IDirect3DDevice8::SetRenderState_TwoSidedLighting
|
||||
{
|
||||
(OOVPA*)&D3DDevice_SetRenderState_TwoSidedLighting_1_0_5558,
|
||||
|
||||
XTL::EmuIDirect3DDevice8_SetTextureState_TwoSidedLighting,
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
"EmuIDirect3DDevice8_SetRenderState_TwoSidedLighting"
|
||||
#endif
|
||||
},
|
||||
};
|
||||
|
||||
// ******************************************************************
|
||||
|
|
Loading…
Reference in New Issue