XPR time...

This commit is contained in:
Aaron Robinson 2003-06-09 03:44:07 +00:00
parent d012c29ed7
commit d57db54dd8
8 changed files with 497 additions and 15 deletions

View File

@ -5,10 +5,9 @@ version: 0.7.2 (??/??/03)
- Textures (bmp, jpg, png, etc)
- rtinit/cinit HLE and pre-entry execution was
totally removed and occurs naturally on a low
level now! (this is great!). This means stdio
and other c libs are initialized correctly.
- rtinit/cinit run on lower level
- stdio seems to be working great :]
version: 0.7.1 (05/30/03)
--------------------------------

View File

@ -1,5 +1,8 @@
Cxbx Todo (* denotes high priority)
* GetDisplayMode / GetAdapterDisplayMode should not return real display
mode when windowed!
* Why is CreateDevice failing for NBA2NIGHT 2002?
* Stabilize Heap Allocation (i.e. operator new) -> Crashes after initial commit is full

View File

@ -200,6 +200,45 @@ HRESULT WINAPI EmuIDirect3D8_CreateDevice
IDirect3DDevice8 **ppReturnedDeviceInterface
);
// ******************************************************************
// * func: EmuIDirect3D8_GetAdapterDisplayMode
// ******************************************************************
HRESULT WINAPI EmuIDirect3D8_GetAdapterDisplayMode
(
UINT Adapter,
X_D3DDISPLAYMODE *pMode
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_CreateVertexShader
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_CreateVertexShader
(
CONST DWORD *pDeclaration,
CONST DWORD *pFunction,
DWORD *pHandle,
DWORD Usage
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetVertexShaderConstant
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_SetVertexShaderConstant
(
INT Register,
CONST PVOID pConstantData,
DWORD ConstantCount
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_CreatePixelShader
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_CreatePixelShader
(
CONST DWORD *pFunction,
DWORD *pHandle
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_CreateTexture
// ******************************************************************
@ -345,6 +384,14 @@ VOID WINAPI EmuIDirect3DDevice8_SetRenderState_ZEnable
DWORD Value
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias
// ******************************************************************
VOID WINAPI EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias
(
DWORD Value
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetTransform
// ******************************************************************

View File

@ -59,6 +59,130 @@ SOOVPA<8> IDirect3D8_CreateDevice_1_0_4361 =
}
};
// ******************************************************************
// * IDirect3D8_GetAdapterDisplayMode
// ******************************************************************
SOOVPA<13> IDirect3D8_GetAdapterDisplayMode_1_0_4361 =
{
0, // Large == 0
13, // Count == 13
{
// IDirect3D8_GetAdapterDisplayMode+0x08 : mov eax, 0x8876086C
{ 0x08, 0xB8 }, // (Offset,Value)-Pair #1
{ 0x09, 0x6C }, // (Offset,Value)-Pair #2
{ 0x0A, 0x08 }, // (Offset,Value)-Pair #3
{ 0x0B, 0x76 }, // (Offset,Value)-Pair #4
{ 0x0C, 0x88 }, // (Offset,Value)-Pair #5
// IDirect3D8_GetAdapterDisplayMode+0x18 : jnz +0x17
{ 0x18, 0x75 }, // (Offset,Value)-Pair #6
{ 0x19, 0x17 }, // (Offset,Value)-Pair #7
// IDirect3D8_GetAdapterDisplayMode+0x31 : mov ecx, [edx+0x2080]
{ 0x31, 0x8B }, // (Offset,Value)-Pair #8
{ 0x32, 0x8A }, // (Offset,Value)-Pair #9
{ 0x33, 0x80 }, // (Offset,Value)-Pair #10
{ 0x34, 0x20 }, // (Offset,Value)-Pair #11
// IDirect3D8_GetAdapterDisplayMode+0xBD : retn 0x08
{ 0xBD, 0xC2 }, // (Offset,Value)-Pair #12
{ 0xBE, 0x08 }, // (Offset,Value)-Pair #13
}
};
// ******************************************************************
// * IDirect3DDevice8_CreateVertexShader
// ******************************************************************
SOOVPA<12> IDirect3DDevice8_CreateVertexShader_1_0_4361 =
{
0, // Large == 0
12, // Count == 12
{
// IDirect3DDevice8_CreateVertexShader+0x00 : push ecx; push ebx; push ebp
{ 0x00, 0x51 }, // (Offset,Value)-Pair #1
{ 0x01, 0x53 }, // (Offset,Value)-Pair #2
{ 0x02, 0x55 }, // (Offset,Value)-Pair #3
// IDirect3DDevice8_CreateVertexShader+0x0A : jz +0x10
{ 0x0A, 0x74 }, // (Offset,Value)-Pair #4
{ 0x0B, 0x10 }, // (Offset,Value)-Pair #5
// IDirect3DDevice8_CreateVertexShader+0x43 : shl eax, 0x02
{ 0x43, 0xC1 }, // (Offset,Value)-Pair #6
{ 0x44, 0xE0 }, // (Offset,Value)-Pair #7
{ 0x45, 0x02 }, // (Offset,Value)-Pair #8
// IDirect3DDevice8_CreateVertexShader+0x66 : retn 0x10
{ 0x66, 0xC2 }, // (Offset,Value)-Pair #9
{ 0x67, 0x10 }, // (Offset,Value)-Pair #10
// IDirect3DDevice8_CreateVertexShader+0x73 : rep stosb
{ 0x73, 0xF3 }, // (Offset,Value)-Pair #11
{ 0x74, 0xAB }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * IDirect3DDevice8_SetVertexShaderConstant
// ******************************************************************
SOOVPA<10> IDirect3DDevice8_SetVertexShaderConstant_1_0_4361 =
{
0, // Large == 0
10, // Count == 10
{
// IDirect3DDevice8_SetVertexShaderConstant+0x11 : mov cl, [ebx+0x08]
{ 0x11, 0x8A }, // (Offset,Value)-Pair #1
{ 0x12, 0x4B }, // (Offset,Value)-Pair #2
{ 0x13, 0x08 }, // (Offset,Value)-Pair #3
// IDirect3DDevice8_SetVertexShaderConstant+0x1A : test cl, 0x10
{ 0x1A, 0xF6 }, // (Offset,Value)-Pair #4
{ 0x1B, 0xC1 }, // (Offset,Value)-Pair #5
{ 0x1C, 0x10 }, // (Offset,Value)-Pair #6
// IDirect3DDevice8_SetVertexShaderConstant+0x60 : jle +0x19
{ 0x60, 0x7E }, // (Offset,Value)-Pair #7
{ 0x61, 0x19 }, // (Offset,Value)-Pair #8
// IDirect3DDevice8_SetVertexShaderConstant+0x98 : retn 0x0C
{ 0x98, 0xC2 }, // (Offset,Value)-Pair #9
{ 0x99, 0x0C }, // (Offset,Value)-Pair #10
}
};
// ******************************************************************
// * IDirect3DDevice8_CreatePixelShader
// ******************************************************************
SOOVPA<11> IDirect3DDevice8_CreatePixelShader_1_0_4361 =
{
0, // Large == 0
11, // Count == 11
{
// IDirect3DDevice8_CreatePixelShader+0x00 : push 0xFC
{ 0x00, 0x68 }, // (Offset,Value)-Pair #1
{ 0x01, 0xFC }, // (Offset,Value)-Pair #2
// IDirect3DDevice8_CreatePixelShader+0x10 : mov eax, 0x8007000E
{ 0x10, 0xB8 }, // (Offset,Value)-Pair #3
{ 0x11, 0x0E }, // (Offset,Value)-Pair #4
{ 0x12, 0x00 }, // (Offset,Value)-Pair #5
{ 0x13, 0x07 }, // (Offset,Value)-Pair #6
{ 0x14, 0x80 }, // (Offset,Value)-Pair #7
// IDirect3DDevice8_CreatePixelShader+0x31 : mov ecx, 0x3C
{ 0x31, 0xB9 }, // (Offset,Value)-Pair #8
{ 0x32, 0x3C }, // (Offset,Value)-Pair #9
// IDirect3DDevice8_CreatePixelShader+0x42 : retn 0x08
{ 0x42, 0xC2 }, // (Offset,Value)-Pair #10
{ 0x43, 0x08 }, // (Offset,Value)-Pair #11
}
};
// ******************************************************************
// * IDirect3DDevice8_CreateTexture
// ******************************************************************
@ -295,29 +419,64 @@ SOOVPA<13> IDirect3DDevice8_SetRenderState_ZEnable_1_0_4361 =
13, // Count == 13
{
// IDirect3DDevice8_SetRenderState_CullMode+0x0C : jb +0x05
// IDirect3DDevice8_SetRenderState_ZEnable+0x0C : jb +0x05
{ 0x0C, 0x72 }, // (Offset,Value)-Pair #1
{ 0x0D, 0x05 }, // (Offset,Value)-Pair #2
// IDirect3DDevice8_SetRenderState_CullMode+0x1B : mov edx, [esi+0x2074h]
// IDirect3DDevice8_SetRenderState_ZEnable+0x1B : mov edx, [esi+0x2074h]
{ 0x1B, 0x8B }, // (Offset,Value)-Pair #3
{ 0x1C, 0x96 }, // (Offset,Value)-Pair #4
{ 0x1D, 0x74 }, // (Offset,Value)-Pair #5
{ 0x1E, 0x20 }, // (Offset,Value)-Pair #6
// IDirect3DDevice8_SetRenderState_CullMode+0x31 : mov dword ptr [eax], 0x4030
// IDirect3DDevice8_SetRenderState_ZEnable+0x31 : mov dword ptr [eax], 0x4030
{ 0x31, 0xC7 }, // (Offset,Value)-Pair #7
{ 0x32, 0x00 }, // (Offset,Value)-Pair #8
{ 0x33, 0x0C }, // (Offset,Value)-Pair #9
{ 0x34, 0x03 }, // (Offset,Value)-Pair #10
{ 0x35, 0x04 }, // (Offset,Value)-Pair #11
// IDirect3DDevice8_SetRenderState_CullMode+0x98 : retn 0x04
// IDirect3DDevice8_SetRenderState_ZEnable+0x98 : retn 0x04
{ 0x98, 0xC2 }, // (Offset,Value)-Pair #12
{ 0x99, 0x04 }, // (Offset,Value)-Pair #13
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias
// ******************************************************************
SOOVPA<12> IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias_1_0_4361 =
{
0, // Large == 0
12, // Count == 12
{
// IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias+0x04 : push esi
{ 0x04, 0x56 }, // (Offset,Value)-Pair #1
// IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias+0x05 : mov esi, dword ptr [addr]
{ 0x05, 0x8B }, // (Offset,Value)-Pair #2
{ 0x06, 0x35 }, // (Offset,Value)-Pair #3
// IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias+0x0B : mov ecx, esi
{ 0x0B, 0x8B }, // (Offset,Value)-Pair #4
{ 0x0C, 0xCE }, // (Offset,Value)-Pair #5
// IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias+0x1C : jb +0x05
{ 0x1C, 0x72 }, // (Offset,Value)-Pair #6
{ 0x1D, 0x05 }, // (Offset,Value)-Pair #7
// IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias+0x38 : shl ecx, 0x10
{ 0x38, 0xC1 }, // (Offset,Value)-Pair #8
{ 0x39, 0xE1 }, // (Offset,Value)-Pair #9
{ 0x3A, 0x10 }, // (Offset,Value)-Pair #10
// IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias+0x4F : retn 0x04
{ 0x4F, 0xC2 }, // (Offset,Value)-Pair #11
{ 0x50, 0x04 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * IDirect3DDevice8_SetTransform
// ******************************************************************
@ -777,6 +936,46 @@ OOVPATable D3D8_1_0_4361[] =
"EmuIDirect3D8_CreateDevice"
#endif
},
// IDirect3D8::GetAdapterDisplayMode
{
(OOVPA*)&IDirect3D8_GetAdapterDisplayMode_1_0_4361,
xd3d8::EmuIDirect3D8_GetAdapterDisplayMode,
#ifdef _DEBUG_TRACE
"EmuIDirect3D8_GetAdapterDisplayMode"
#endif
},
// IDirect3DDevice8::CreateVertexShader
{
(OOVPA*)&IDirect3DDevice8_CreateVertexShader_1_0_4361,
xd3d8::EmuIDirect3DDevice8_CreateVertexShader,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_CreateVertexShader"
#endif
},
// IDirect3DDevice8::SetVertexShaderConstant
{
(OOVPA*)&IDirect3DDevice8_SetVertexShaderConstant_1_0_4361,
xd3d8::EmuIDirect3DDevice8_SetVertexShaderConstant,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetVertexShaderConstant"
#endif
},
// IDirect3DDevice8::CreatePixelShader
{
(OOVPA*)&IDirect3DDevice8_CreatePixelShader_1_0_4361,
xd3d8::EmuIDirect3DDevice8_CreatePixelShader,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_CreatePixelShader"
#endif
},
// IDirect3DDevice8::CreateTexture
{
(OOVPA*)&IDirect3DDevice8_CreateTexture_1_0_4361,
@ -907,6 +1106,16 @@ OOVPATable D3D8_1_0_4361[] =
"EmuIDirect3DDevice8_SetRenderState_ZEnable"
#endif
},
// IDirect3DDevice8::SetRenderState_MultiSampleAntiAlias
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias_1_0_4361,
xd3d8::EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias"
#endif
},
// IDirect3DDevice8::SetTransform
{
(OOVPA*)&IDirect3DDevice8_SetTransform_1_0_4361,

View File

@ -364,6 +364,8 @@ extern "C" CXBXKRNL_API void NTAPI EmuInit
{
EmuSwapFS(); // XBox FS
// _asm int 3
Entry();
EmuSwapFS(); // Win2k/XP FS

View File

@ -80,6 +80,7 @@ static DWORD WINAPI EmuUpdateTickCount(LPVOID);
// ******************************************************************
static xd3d8::LPDIRECT3D8 g_pD3D8 = NULL; // Direct3D8
static xd3d8::LPDIRECT3DDEVICE8 g_pD3D8Device = NULL; // Direct3D8 Device
static DWORD g_VertexShaderUsage = 0; // Vertex Shader Usage Param
static Xbe::Header *g_XbeHeader = NULL; // XbeHeader
static uint32 g_XbeHeaderSize = 0; // XbeHeaderSize
static xd3d8::D3DCAPS8 g_D3DCaps; // Direct3D8 Caps
@ -140,7 +141,7 @@ VOID EmuD3DInit(Xbe::Header *XbeHeader, uint32 XbeHeaderSize)
g_pD3D8 = Direct3DCreate8(D3D_SDK_VERSION);
if(g_pD3D8 == NULL)
EmuCleanup("Could not initialize Direct3D!");
EmuCleanup("Could not initialize Direct3D8!");
D3DDEVTYPE DevType = (g_XBVideo.GetDirect3DDevice() == 0) ? D3DDEVTYPE_HAL : D3DDEVTYPE_REF;
@ -387,6 +388,9 @@ HRESULT WINAPI xd3d8::EmuIDirect3D8_CreateDevice
pPresentationParameters->BackBufferFormat = EmuXB2PC_D3DFormat(pPresentationParameters->BackBufferFormat);
pPresentationParameters->AutoDepthStencilFormat = EmuXB2PC_D3DFormat(pPresentationParameters->AutoDepthStencilFormat);
// TODO: This should be detected from D3DCAPS8 ? (FrameSkip?)
pPresentationParameters->FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
// ******************************************************************
// * Retrieve Resolution from Configuration
// ******************************************************************
@ -431,6 +435,7 @@ HRESULT WINAPI xd3d8::EmuIDirect3D8_CreateDevice
printf("EmuD3D8 (0x%X): Using hardware vertex processing\n", GetCurrentThreadId());
#endif
BehaviorFlags = D3DCREATE_HARDWARE_VERTEXPROCESSING;
g_VertexShaderUsage = 0;
}
else
{
@ -438,6 +443,7 @@ HRESULT WINAPI xd3d8::EmuIDirect3D8_CreateDevice
printf("EmuD3D8 (0x%X): Using software vertex processing\n", GetCurrentThreadId());
#endif
BehaviorFlags = D3DCREATE_SOFTWARE_VERTEXPROCESSING;
g_VertexShaderUsage = D3DUSAGE_SOFTWAREPROCESSING;
}
// ******************************************************************
@ -463,6 +469,193 @@ HRESULT WINAPI xd3d8::EmuIDirect3D8_CreateDevice
return hRet;
}
// ******************************************************************
// * func: EmuIDirect3D8_GetAdapterDisplayMode
// ******************************************************************
HRESULT WINAPI xd3d8::EmuIDirect3D8_GetAdapterDisplayMode
(
UINT Adapter,
X_D3DDISPLAYMODE *pMode
)
{
EmuSwapFS(); // Win2k/XP FS
// ******************************************************************
// * debug trace
// ******************************************************************
#ifdef _DEBUG_TRACE
{
printf("EmuD3D8 (0x%X): EmuIDirect3D8_GetAdapterDisplayMode\n"
"(\n"
" Adapter : 0x%.08X\n"
" pMode : 0x%.08X\n"
");\n",
GetCurrentThreadId(), Adapter, pMode);
}
#endif
// ******************************************************************
// * redirect to windows d3d
// ******************************************************************
HRESULT hRet = g_pD3D8->GetAdapterDisplayMode
(
g_XBVideo.GetDisplayAdapter(),
(D3DDISPLAYMODE*)pMode
);
// ******************************************************************
// * make adjustments to parameters to make sense with windows d3d
// ******************************************************************
{
D3DDISPLAYMODE *pPCMode = (D3DDISPLAYMODE*)pMode;
// Convert Format (PC->Xbox)
pMode->Format = EmuPC2XB_D3DFormat(pPCMode->Format);
// TODO: Make this configurable in the future?
pMode->Flags = 0x000000A1; // D3DPRESENTFLAG_FIELD | D3DPRESENTFLAG_INTERLACED | D3DPRESENTFLAG_LOCKABLE_BACKBUFFER
}
EmuSwapFS(); // XBox FS
return hRet;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_CreateVertexShader
// ******************************************************************
HRESULT WINAPI xd3d8::EmuIDirect3DDevice8_CreateVertexShader
(
CONST DWORD *pDeclaration,
CONST DWORD *pFunction,
DWORD *pHandle,
DWORD Usage
)
{
EmuSwapFS(); // Win2k/XP FS
// ******************************************************************
// * debug trace
// ******************************************************************
#ifdef _DEBUG_TRACE
{
printf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreateVertexShader\n"
"(\n"
" pDeclaration : 0x%.08X\n"
" pFunction : 0x%.08X\n"
" pHandle : 0x%.08X\n"
" Usage : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pDeclaration, pFunction, pHandle, Usage);
}
#endif
// ******************************************************************
// * redirect to windows d3d
// ******************************************************************
HRESULT hRet = g_pD3D8Device->CreateVertexShader
(
pDeclaration,
pFunction,
pHandle,
g_VertexShaderUsage // TODO: HACK: Xbox has extensions!
);
// hey look, we lied
hRet = D3D_OK;
EmuSwapFS(); // XBox FS
return hRet;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetVertexShaderConstant
// ******************************************************************
HRESULT WINAPI xd3d8::EmuIDirect3DDevice8_SetVertexShaderConstant
(
INT Register,
CONST PVOID pConstantData,
DWORD ConstantCount
)
{
EmuSwapFS(); // Win2k/XP FS
// ******************************************************************
// * debug trace
// ******************************************************************
#ifdef _DEBUG_TRACE
{
printf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexShaderConstant\n"
"(\n"
" Register : 0x%.08X\n"
" pConstantData : 0x%.08X\n"
" ConstantCount : 0x%.08X\n"
");\n",
GetCurrentThreadId(), Register, pConstantData, ConstantCount);
}
#endif
// ******************************************************************
// * redirect to windows d3d
// ******************************************************************
HRESULT hRet = g_pD3D8Device->SetVertexShaderConstant
(
Register,
pConstantData,
ConstantCount
);
// hey look, we lied
hRet = D3D_OK;
EmuSwapFS(); // XBox FS
return hRet;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_CreatePixelShader
// ******************************************************************
HRESULT WINAPI xd3d8::EmuIDirect3DDevice8_CreatePixelShader
(
CONST DWORD *pFunction,
DWORD *pHandle
)
{
EmuSwapFS(); // Win2k/XP FS
// ******************************************************************
// * debug trace
// ******************************************************************
#ifdef _DEBUG_TRACE
{
printf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreatePixelShader\n"
"(\n"
" pFunction : 0x%.08X\n"
" pHandle : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pFunction, pHandle);
}
#endif
// ******************************************************************
// * redirect to windows d3d
// ******************************************************************
HRESULT hRet = g_pD3D8Device->CreatePixelShader
(
pFunction,
pHandle
);
// hey look, we lied
hRet = D3D_OK;
EmuSwapFS(); // XBox FS
return hRet;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_CreateTexture
// ******************************************************************
@ -1031,7 +1224,6 @@ VOID WINAPI xd3d8::EmuIDirect3DDevice8_SetRenderState_CullMode
return;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetRenderState_ZEnable
// ******************************************************************
@ -1061,6 +1253,35 @@ VOID WINAPI xd3d8::EmuIDirect3DDevice8_SetRenderState_ZEnable
return;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias
// ******************************************************************
VOID WINAPI xd3d8::EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias
(
DWORD Value
)
{
EmuSwapFS(); // Win2k/XP FS
// ******************************************************************
// * debug trace
// ******************************************************************
#ifdef _DEBUG_TRACE
{
printf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias\n"
"(\n"
" Value : 0x%.08X\n"
");\n",
GetCurrentThreadId(), Value);
}
#endif
g_pD3D8Device->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, Value);
EmuSwapFS(); // XBox FS
return;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetTransform

View File

@ -158,17 +158,18 @@ void EmuGenerateFS(Xbe::TLS *pTLS, void *pTLSData)
// * Generate TIB
// ******************************************************************
{
xboxkrnl::KTHREAD *KThread = new xboxkrnl::KTHREAD();
xboxkrnl::ETHREAD *EThread = new xboxkrnl::ETHREAD();
EThread->Tcb.TlsData = (void*)pNewTLS;
EThread->UniqueThread = GetCurrentThreadId();
memcpy(&NewPcr->NtTib, OrgNtTib, sizeof(NT_TIB));
NewPcr->NtTib.Self = &NewPcr->NtTib;
NewPcr->PrcbData.CurrentThread = KThread;
NewPcr->PrcbData.CurrentThread = (xboxkrnl::KTHREAD*)EThread;
NewPcr->Prcb = &NewPcr->PrcbData;
NewPcr->PrcbData.CurrentThread->TlsData = (void*)pNewTLS;
}
// ******************************************************************

View File

@ -553,7 +553,7 @@ VOID WINAPI xapi::EmuXapiBootDash(DWORD UnknownA, DWORD UnknownB, DWORD UnknownC
}
#endif
EmuCleanup("EmuXapiBootDash");
EmuCleanup("Emulation Terminated (XapiBootDash)");
EmuSwapFS(); // XBox FS