diff --git a/src/Common/Logging.h b/src/Common/Logging.h index eb5b9037c..98b218f0b 100644 --- a/src/Common/Logging.h +++ b/src/Common/Logging.h @@ -147,7 +147,7 @@ extern thread_local std::string _logPrefix; do { if(g_bPrintfOn) { \ bool _had_arg = false; \ std::stringstream tmp; \ - tmp << __FILENAME__ << " (" << hex2((uint16_t)GetCurrentThreadId()) << "): "; \ + tmp << "[" << hex2((uint16_t)GetCurrentThreadId()) << "] " << __FILENAME__ << ": "; \ _logPrefix = tmp.str(); \ std::stringstream msg; \ msg << _logPrefix << __func__ << "("; diff --git a/src/Cxbx.h b/src/Cxbx.h index 631d29c23..44beef83d 100644 --- a/src/Cxbx.h +++ b/src/Cxbx.h @@ -106,7 +106,7 @@ extern volatile bool g_bPrintfOn; /*! DbgPrintf enabled if _DEBUG_TRACE is set */ #ifdef _DEBUG_TRACE - #define DbgPrintf(fmt, ...) do { if(g_bPrintfOn) printf(fmt, ##__VA_ARGS__); } while (0) + #define DbgPrintf(fmt, ...) do { if(g_bPrintfOn) printf("[0x%X] "##fmt, GetCurrentThreadId(), ##__VA_ARGS__); } while (0) #else inline void null_func(...) { } #define DbgPrintf null_func diff --git a/src/CxbxKrnl/CxbxKrnl.cpp b/src/CxbxKrnl/CxbxKrnl.cpp index a30074f7b..9c650a608 100644 --- a/src/CxbxKrnl/CxbxKrnl.cpp +++ b/src/CxbxKrnl/CxbxKrnl.cpp @@ -397,8 +397,8 @@ extern "C" CXBXKRNL_API void CxbxKrnlInit SetConsoleTextAttribute(StdHandle, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED); - printf("EmuMain (0x%X): Cxbx-Reloaded Version %s\n", GetCurrentThreadId(), _CXBX_VERSION); - printf("EmuMain (0x%X): Debug Console Allocated (DM_CONSOLE).\n", GetCurrentThreadId()); + printf("[0x%X] EmuMain: Cxbx-Reloaded Version %s\n", GetCurrentThreadId(), _CXBX_VERSION); + printf("[0x%X] EmuMain: Debug Console Allocated (DM_CONSOLE).\n", GetCurrentThreadId()); } } else if (DbgMode == DM_FILE) @@ -407,8 +407,8 @@ extern "C" CXBXKRNL_API void CxbxKrnlInit freopen(szDebugFilename, "wt", stdout); - printf("EmuMain (0x%X): Cxbx-Reloaded Version %s\n", GetCurrentThreadId(), _CXBX_VERSION); - printf("EmuMain (0x%X): Debug Console Allocated (DM_FILE).\n", GetCurrentThreadId()); + printf("[0x%X] EmuMain: Cxbx-Reloaded Version %s\n", GetCurrentThreadId(), _CXBX_VERSION); + printf("[0x%X] EmuMain: Debug Console Allocated (DM_FILE).\n", GetCurrentThreadId()); } else { @@ -426,9 +426,9 @@ extern "C" CXBXKRNL_API void CxbxKrnlInit { #ifdef _DEBUG_TRACE - printf("EmuMain (0x%X): Debug Trace Enabled.\n", GetCurrentThreadId()); + printf("[0x%X] EmuMain: Debug Trace Enabled.\n", GetCurrentThreadId()); - printf("EmuMain (0x%X): CxbxKrnlInit\n" + printf("[0x%X] EmuMain: CxbxKrnlInit\n" "(\n" " hwndParent : 0x%.08X\n" " pTLSData : 0x%.08X\n" @@ -443,7 +443,7 @@ extern "C" CXBXKRNL_API void CxbxKrnlInit GetCurrentThreadId(), hwndParent, pTLSData, pTLS, pLibraryVersion, DbgMode, szDebugFilename, pXbeHeader, dwXbeHeaderSize, Entry); #else - printf("EmuMain (0x%X): Debug Trace Disabled.\n", GetCurrentThreadId()); + printf("[0x%X] EmuMain: Debug Trace Disabled.\n", GetCurrentThreadId()); #endif } @@ -599,17 +599,17 @@ extern "C" CXBXKRNL_API void CxbxKrnlInit // // initialize grapchics // - DbgPrintf("EmuMain (0x%X): Initializing render window.\n", GetCurrentThreadId()); + DbgPrintf("EmuMain: Initializing render window.\n"); XTL::CxbxInitWindow(pXbeHeader, dwXbeHeaderSize); if (bLLE_GPU) { - DbgPrintf("EmuMain (0x%X): Initializing OpenGL.\n", GetCurrentThreadId()); + DbgPrintf("EmuMain: Initializing OpenGL.\n"); InitOpenGLContext(); } else { - DbgPrintf("EmuMain (0x%X): Initializing Direct3D.\n", GetCurrentThreadId()); + DbgPrintf("EmuMain: Initializing Direct3D.\n"); XTL::EmuD3DInit(pXbeHeader, dwXbeHeaderSize); } @@ -627,11 +627,11 @@ extern "C" CXBXKRNL_API void CxbxKrnlInit EmuX86_Init(); - DbgPrintf("EmuMain (0x%X): Initial thread starting.\n", GetCurrentThreadId()); + DbgPrintf("EmuMain: Initial thread starting.\n"); CxbxLaunchXbe(Entry); - DbgPrintf("EmuMain (0x%X): Initial thread ended.\n", GetCurrentThreadId()); + DbgPrintf("EmuMain: Initial thread ended.\n"); fflush(stdout); @@ -654,7 +654,7 @@ extern "C" CXBXKRNL_API void CxbxKrnlCleanup(const char *szErrorMessage, ...) va_list argp; - sprintf(szBuffer1, "EmuMain (0x%X): Recieved Fatal Message:\n\n* ", GetCurrentThreadId()); + sprintf(szBuffer1, "[0x%X] EmuMain: Recieved Fatal Message:\n\n* ", GetCurrentThreadId()); va_start(argp, szErrorMessage); @@ -796,12 +796,12 @@ extern "C" CXBXKRNL_API void CxbxKrnlTerminateThread() extern "C" CXBXKRNL_API void CxbxKrnlPanic() { - DbgPrintf("EmuMain (0x%X): CxbxKrnlPanic()\n", GetCurrentThreadId()); + DbgPrintf("EmuMain: CxbxKrnlPanic()\n"); CxbxKrnlCleanup("Kernel Panic!"); } extern "C" CXBXKRNL_API void CxbxKrnlNoFunc() { - DbgPrintf("EmuMain (0x%X): CxbxKrnlNoFunc()\n", GetCurrentThreadId()); + DbgPrintf("EmuMain: CxbxKrnlNoFunc()\n"); } diff --git a/src/CxbxKrnl/Emu.cpp b/src/CxbxKrnl/Emu.cpp index 98113bea3..1a3e9b277 100644 --- a/src/CxbxKrnl/Emu.cpp +++ b/src/CxbxKrnl/Emu.cpp @@ -124,7 +124,7 @@ extern "C" CXBXKRNL_API void NTAPI EmuWarning(const char *szWarningMessage, ...) va_list argp; - sprintf(szBuffer1, "EmuWarn (0x%X): ", GetCurrentThreadId()); + sprintf(szBuffer1, "[0x%X] EmuWarn: ", GetCurrentThreadId()); va_start(argp, szWarningMessage); @@ -150,9 +150,9 @@ void EmuExceptionPrintDebugInformation(LPEXCEPTION_POINTERS e, bool IsBreakpoint // print debug information { if (IsBreakpointException) - printf("EmuMain (0x%X): Recieved Breakpoint Exception (int 3)\n", GetCurrentThreadId()); + printf("[0x%X] EmuMain: Recieved Breakpoint Exception (int 3)\n", GetCurrentThreadId()); else - printf("EmuMain (0x%X): Recieved Exception (Code := 0x%.08X)\n", GetCurrentThreadId(), e->ExceptionRecord->ExceptionCode); + printf("[0x%X] EmuMain: Recieved Exception (Code := 0x%.08X)\n", GetCurrentThreadId(), e->ExceptionRecord->ExceptionCode); printf("\n" " EIP := 0x%.08X EFL := 0x%.08X\n" @@ -176,7 +176,7 @@ void EmuExceptionPrintDebugInformation(LPEXCEPTION_POINTERS e, bool IsBreakpoint void EmuExceptionExitProcess() { - printf("EmuMain (0x%X): Aborting Emulation\n", GetCurrentThreadId()); + printf("[0x%X] EmuMain: Aborting Emulation\n", GetCurrentThreadId()); fflush(stdout); if (CxbxKrnl_hEmuParent != NULL) @@ -205,7 +205,7 @@ bool EmuExceptionBreakpointAsk(LPEXCEPTION_POINTERS e) } else if (ret == IDIGNORE) { - printf("EmuMain (0x%X): Ignored Breakpoint Exception\n", GetCurrentThreadId()); + printf("[0x%X] EmuMain: Ignored Breakpoint Exception\n", GetCurrentThreadId()); fflush(stdout); e->ContextRecord->Eip += 1; // TODO : Skip actual instruction size bytes @@ -298,9 +298,9 @@ int ExitException(LPEXCEPTION_POINTERS e) static int count = 0; // debug information - printf("EmuMain (0x%X): * * * * * EXCEPTION * * * * *\n", GetCurrentThreadId()); - printf("EmuMain (0x%X): Recieved Exception [0x%.08X]@0x%.08X\n", GetCurrentThreadId(), e->ExceptionRecord->ExceptionCode, e->ContextRecord->Eip); - printf("EmuMain (0x%X): * * * * * EXCEPTION * * * * *\n", GetCurrentThreadId()); + printf("[0x%X] EmuMain: * * * * * EXCEPTION * * * * *\n", GetCurrentThreadId()); + printf("[0x%X] EmuMain: Recieved Exception [0x%.08X]@0x%.08X\n", GetCurrentThreadId(), e->ExceptionRecord->ExceptionCode, e->ContextRecord->Eip); + printf("[0x%X] EmuMain: * * * * * EXCEPTION * * * * *\n", GetCurrentThreadId()); fflush(stdout); diff --git a/src/CxbxKrnl/EmuD3D8.cpp b/src/CxbxKrnl/EmuD3D8.cpp index 704b99ac7..f41cf7bbd 100644 --- a/src/CxbxKrnl/EmuD3D8.cpp +++ b/src/CxbxKrnl/EmuD3D8.cpp @@ -413,7 +413,7 @@ static DWORD WINAPI EmuRenderWindow(LPVOID lpVoid) if(!XTL::EmuDInputInit()) CxbxKrnlCleanup("Could not initialize DirectInput!"); - DbgPrintf("EmuD3D8 (0x%X): Message-Pump thread is running.\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: Message-Pump thread is running.\n"); SetFocus(g_hEmuWindow); @@ -646,7 +646,7 @@ static DWORD WINAPI EmuUpdateTickCount(LPVOID) // since callbacks come from here EmuGenerateFS(CxbxKrnl_TLS, CxbxKrnl_TLSData); - DbgPrintf("EmuD3D8 (0x%X): Timing thread is running.\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: Timing thread is running.\n"); timeBeginPeriod(0); @@ -732,14 +732,14 @@ static DWORD WINAPI EmuUpdateTickCount(LPVOID) // thread dedicated to create devices static DWORD WINAPI EmuCreateDeviceProxy(LPVOID) { - DbgPrintf("EmuD3D8 (0x%X): CreateDevice proxy thread is running.\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: CreateDevice proxy thread is running.\n"); while(true) { // if we have been signalled, create the device with cached parameters if(g_EmuCDPD.bReady) { - DbgPrintf("EmuD3D8 (0x%X): CreateDevice proxy thread recieved request.\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: CreateDevice proxy thread recieved request.\n"); if(g_EmuCDPD.bCreate) { @@ -747,7 +747,7 @@ static DWORD WINAPI EmuCreateDeviceProxy(LPVOID) // TODO: ensure all surfaces are somehow cleaned up? if(g_pD3DDevice8 != 0) { - DbgPrintf("EmuD3D8 (0x%X): CreateDevice proxy thread releasing old Device.\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: CreateDevice proxy thread releasing old Device.\n"); g_pD3DDevice8->EndScene(); @@ -851,14 +851,14 @@ static DWORD WINAPI EmuCreateDeviceProxy(LPVOID) // detect vertex processing capabilities if((g_D3DCaps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) && g_EmuCDPD.DeviceType == XTL::D3DDEVTYPE_HAL) { - DbgPrintf("EmuD3D8 (0x%X): Using hardware vertex processing\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: Using hardware vertex processing\n"); g_EmuCDPD.BehaviorFlags = D3DCREATE_HARDWARE_VERTEXPROCESSING; g_dwVertexShaderUsage = 0; } else { - DbgPrintf("EmuD3D8 (0x%X): Using software vertex processing\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: Using software vertex processing\n"); g_EmuCDPD.BehaviorFlags = D3DCREATE_SOFTWARE_VERTEXPROCESSING; g_dwVertexShaderUsage = D3DUSAGE_SOFTWAREPROCESSING; @@ -950,12 +950,12 @@ static DWORD WINAPI EmuCreateDeviceProxy(LPVOID) // Does the user want to use Hardware accelerated YUV surfaces? if(g_bSupportsYUY2 && g_XBVideo.GetHardwareYUV()) - DbgPrintf("EmuD3D8 (0x%X): Hardware accelerated YUV surfaces Enabled...\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: Hardware accelerated YUV surfaces Enabled...\n"); if(!g_XBVideo.GetHardwareYUV()) { g_bSupportsYUY2 = false; - DbgPrintf("EmuD3D8 (0x%X): Hardware accelerated YUV surfaces Disabled...\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: Hardware accelerated YUV surfaces Disabled...\n"); } } @@ -1027,7 +1027,7 @@ static DWORD WINAPI EmuCreateDeviceProxy(LPVOID) // release direct3d if(g_pD3DDevice8 != 0) { - DbgPrintf("EmuD3D8 (0x%X): CreateDevice proxy thread releasing old Device.\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: CreateDevice proxy thread releasing old Device.\n"); g_pD3DDevice8->EndScene(); @@ -1243,7 +1243,7 @@ HRESULT WINAPI XTL::EmuIDirect3D8_CreateDevice { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3D8_CreateDevice\n" + DbgPrintf("EmuD3D8: EmuIDirect3D8_CreateDevice\n" "(\n" " Adapter : 0x%.08X\n" " DeviceType : 0x%.08X\n" @@ -1252,7 +1252,7 @@ HRESULT WINAPI XTL::EmuIDirect3D8_CreateDevice " pPresentationParameters : 0x%.08X\n" " ppReturnedDeviceInterface : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Adapter, DeviceType, hFocusWindow, + Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, ppReturnedDeviceInterface); // Print a few of the pPresentationParameters contents to the console @@ -1300,8 +1300,7 @@ BOOL WINAPI XTL::EmuIDirect3DDevice8_IsBusy() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_IsBusy();\n", - GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_IsBusy();\n"); EmuWarning("EmuIDirect3DDevice8_IsBusy ignored!"); @@ -1317,11 +1316,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_GetCreationParameters(D3DDEVICE_CREATION_PA { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetCreationParameters\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetCreationParameters\n" "(\n" " pParameters : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pParameters); + pParameters); pParameters->AdapterOrdinal = D3DADAPTER_DEFAULT; pParameters->DeviceType = D3DDEVTYPE_HAL; @@ -1348,7 +1347,7 @@ HRESULT WINAPI XTL::EmuIDirect3D8_CheckDeviceFormat { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3D8_CheckDeviceFormat\n" + DbgPrintf("EmuD3D8: EmuIDirect3D8_CheckDeviceFormat\n" "(\n" " Adapter : 0x%.08X\n" " DeviceType : 0x%.08X\n" @@ -1357,7 +1356,7 @@ HRESULT WINAPI XTL::EmuIDirect3D8_CheckDeviceFormat " RType : 0x%.08X\n" " CheckFormat : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Adapter, DeviceType, AdapterFormat, + Adapter, DeviceType, AdapterFormat, Usage, RType, CheckFormat); if(RType > 7) @@ -1383,11 +1382,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_GetDisplayFieldStatus(X_D3DFIELD_STATUS *pF { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetDisplayFieldStatus\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetDisplayFieldStatus\n" "(\n" " pFieldStatus : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pFieldStatus); + pFieldStatus); #if 1 pFieldStatus->Field = (g_VBData.VBlank%2 == 0) ? X_D3DFIELD_ODD : X_D3DFIELD_EVEN; @@ -1409,7 +1408,7 @@ PDWORD WINAPI XTL::EmuIDirect3DDevice8_BeginPush(DWORD Count) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_BeginPush(%d);\n", GetCurrentThreadId(), Count); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_BeginPush(%d);\n", Count); DWORD *pRet = new DWORD[Count]; @@ -1428,7 +1427,7 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_EndPush(DWORD *pPush) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_EndPush(0x%.08X);\n", GetCurrentThreadId(), pPush); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_EndPush(0x%.08X);\n", pPush); #ifdef _DEBUG_TRACK_PB // DbgDumpPushBuffer(g_pPrimaryPB, g_dwPrimaryPBCount*sizeof(DWORD)); @@ -1452,7 +1451,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_BeginVisibilityTest() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_BeginVisibilityTest();\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_BeginVisibilityTest();\n"); @@ -1469,11 +1468,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_EndVisibilityTest { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_EndVisibilityTest\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_EndVisibilityTest\n" "(\n" " Index : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Index); + Index); @@ -1487,12 +1486,12 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetBackBufferScale(FLOAT x, FLOAT y) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetBackBufferScale\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetBackBufferScale\n" "(\n" " x : %f\n" " y : %f\n" ");\n", - GetCurrentThreadId(), x, y); + x, y); EmuWarning("SetBackBufferScale ignored"); @@ -1513,13 +1512,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetVisibilityTestResult { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetVisibilityTestResult\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetVisibilityTestResult\n" "(\n" " Index : 0x%.08X\n" " pResult : 0x%.08X\n" " pTimeStamp : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Index, pResult, pTimeStamp); + Index, pResult, pTimeStamp); // TODO: actually emulate this!? @@ -1544,11 +1543,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_GetDeviceCaps { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetDeviceCaps\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetDeviceCaps\n" "(\n" " pCaps : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pCaps); + pCaps); HRESULT hRet = g_pD3D8->GetDeviceCaps(g_XBVideo.GetDisplayAdapter(), (g_XBVideo.GetDirect3DDevice() == 0) ? XTL::D3DDEVTYPE_HAL : XTL::D3DDEVTYPE_REF, pCaps); if(FAILED(hRet)) @@ -1571,12 +1570,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_LoadVertexShader // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_LoadVertexShader\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_LoadVertexShader\n" "(\n" " Handle : 0x%.08X\n" " Address : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Handle,Address); + Handle,Address); if(Address < 136 && VshHandleIsVertexShader(Handle)) { @@ -1604,12 +1603,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SelectVertexShader { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SelectVertexShader\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SelectVertexShader\n" "(\n" " Handle : 0x%.08X\n" " Address : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Handle, Address); + Handle, Address); if(VshHandleIsVertexShader(Handle)) { @@ -1646,7 +1645,7 @@ VOID WINAPI XTL::EmuIDirect3D8_KickOffAndWaitForIdle() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3D8_KickOffAndWaitForIdle()\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3D8_KickOffAndWaitForIdle()\n"); // TODO: Actually do something here? @@ -1662,12 +1661,12 @@ VOID WINAPI XTL::EmuIDirect3D8_KickOffAndWaitForIdle2(DWORD dwDummy1, DWORD dwDu { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3D8_KickOffAndWaitForIdle\n" + DbgPrintf("EmuD3D8: EmuIDirect3D8_KickOffAndWaitForIdle\n" "(\n" " dwDummy1 : 0x%.08X\n" " dwDummy2 : 0x%.08X\n" ");\n", - GetCurrentThreadId(), dwDummy1, dwDummy2); + dwDummy1, dwDummy2); // TODO: Actually do something here? @@ -1687,12 +1686,12 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetGammaRamp { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetGammaRamp\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetGammaRamp\n" "(\n" " dwFlags : 0x%.08X\n" " pRamp : 0x%.08X\n" ");\n", - GetCurrentThreadId(), dwFlags, pRamp); + dwFlags, pRamp); // remove D3DSGR_IMMEDIATE DWORD dwPCFlags = dwFlags & (~0x00000002); @@ -1719,7 +1718,7 @@ ULONG WINAPI XTL::EmuIDirect3DDevice8_AddRef() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_AddRef()\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_AddRef()\n"); ULONG ret = g_pD3DDevice8->AddRef(); @@ -1735,7 +1734,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_BeginStateBlock() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_BeginStateBlock()\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_BeginStateBlock()\n"); ULONG ret = g_pD3DDevice8->BeginStateBlock(); @@ -1751,7 +1750,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_BeginStateBig() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_BeginStateBig()\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_BeginStateBig()\n"); //ULONG ret = g_pD3DDevice8->BeginStateBlock(); @@ -1769,11 +1768,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CaptureStateBlock(DWORD Token) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CaptureStateBlock\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_CaptureStateBlock\n" "(\n" " Token : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Token); + Token); ULONG ret = g_pD3DDevice8->CaptureStateBlock(Token); @@ -1789,11 +1788,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_ApplyStateBlock(DWORD Token) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_ApplyStateBlock\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_ApplyStateBlock\n" "(\n" " Token : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Token); + Token); ULONG ret = g_pD3DDevice8->ApplyStateBlock(Token); @@ -1809,11 +1808,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_EndStateBlock(DWORD *pToken) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_EndStateBlock\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_EndStateBlock\n" "(\n" " pToken : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pToken); + pToken); ULONG ret = g_pD3DDevice8->EndStateBlock(pToken); @@ -1836,7 +1835,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CopyRects { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CopyRects\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_CopyRects\n" "(\n" " pSourceSurface : 0x%.08X\n" " pSourceRectsArray : 0x%.08X\n" @@ -1844,7 +1843,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CopyRects " pDestinationSurface : 0x%.08X\n" " pDestPointsArray : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pSourceSurface, pSourceRectsArray, cRects, + pSourceSurface, pSourceRectsArray, cRects, pDestinationSurface, pDestPointsArray); pSourceSurface->EmuSurface8->UnlockRect(); @@ -1885,14 +1884,14 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateImageSurface { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreateImageSurface\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_CreateImageSurface\n" "(\n" " Width : 0x%.08X\n" " Height : 0x%.08X\n" " Format : 0x%.08X\n" " ppBackBuffer : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Width, Height, Format, ppBackBuffer); + Width, Height, Format, ppBackBuffer); *ppBackBuffer = new X_D3DSurface(); @@ -1924,11 +1923,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_GetGammaRamp { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetGammaRamp\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetGammaRamp\n" "(\n" " pRamp : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pRamp); + pRamp); D3DGAMMARAMP *pGammaRamp = (D3DGAMMARAMP *)malloc(sizeof(D3DGAMMARAMP)); @@ -1958,11 +1957,11 @@ XTL::X_D3DSurface* WINAPI XTL::EmuIDirect3DDevice8_GetBackBuffer2 { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetBackBuffer2\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetBackBuffer2\n" "(\n" " BackBuffer : 0x%.08X\n" ");\n", - GetCurrentThreadId(), BackBuffer); + BackBuffer); /** unsafe, somehow HRESULT hRet = S_OK; @@ -2029,13 +2028,13 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_GetBackBuffer X_D3DSurface **ppBackBuffer ) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetBackBuffer\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetBackBuffer\n" "(\n" " BackBuffer : 0x%.08X\n" " Type : 0x%.08X\n" " ppBackBuffer : 0x%.08X\n" ");\n", - GetCurrentThreadId(), BackBuffer, Type, ppBackBuffer); + BackBuffer, Type, ppBackBuffer); *ppBackBuffer = EmuIDirect3DDevice8_GetBackBuffer2(BackBuffer); @@ -2052,11 +2051,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetViewport { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetViewport\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetViewport\n" "(\n" " pViewport : 0x%.08X (%d, %d, %d, %d, %f, %f)\n" ");\n", - GetCurrentThreadId(), pViewport, pViewport->X, pViewport->Y, pViewport->Width, + pViewport, pViewport->X, pViewport->Y, pViewport->Width, pViewport->Height, pViewport->MinZ, pViewport->MaxZ); DWORD dwWidth = pViewport->Width; @@ -2109,11 +2108,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetViewport { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetViewport\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetViewport\n" "(\n" " pViewport : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pViewport); + pViewport); HRESULT hRet = g_pD3DDevice8->GetViewport(pViewport); @@ -2139,12 +2138,12 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_GetViewportOffsetAndScale { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetViewportOffsetAndScale\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetViewportOffsetAndScale\n" "(\n" " pOffset : 0x%.08X\n" " pScale : 0x%.08X\n" ");\n", - GetCurrentThreadId(),pOffset,pScale); + pOffset, pScale); float fScaleX = 1.0f; float fScaleY = 1.0f; @@ -2193,11 +2192,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetShaderConstantMode { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetShaderConstantMode\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetShaderConstantMode\n" "(\n" " Mode : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Mode); + Mode); g_VertexShaderConstantMode = Mode; @@ -2216,11 +2215,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_Reset { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_Reset\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_Reset\n" "(\n" " pPresentationParameters : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pPresentationParameters); + pPresentationParameters); EmuWarning("Device Reset is being utterly ignored"); @@ -2239,11 +2238,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetRenderTarget { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetRenderTarget\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetRenderTarget\n" "(\n" " ppRenderTarget : 0x%.08X\n" ");\n", - GetCurrentThreadId(), ppRenderTarget); + ppRenderTarget); IDirect3DSurface8 *pSurface8 = g_pCachedRenderTarget->EmuSurface8; @@ -2251,7 +2250,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetRenderTarget *ppRenderTarget = g_pCachedRenderTarget; - DbgPrintf("EmuD3D8 (0x%X): RenderTarget := 0x%.08X\n", GetCurrentThreadId(), pSurface8); + DbgPrintf("EmuD3D8: RenderTarget := 0x%.08X\n", pSurface8); @@ -2265,13 +2264,13 @@ XTL::X_D3DSurface * WINAPI XTL::EmuIDirect3DDevice8_GetRenderTarget2() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetRenderTarget2()\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetRenderTarget2()\n"); IDirect3DSurface8 *pSurface8 = g_pCachedRenderTarget->EmuSurface8; pSurface8->AddRef(); - DbgPrintf("EmuD3D8 (0x%X): RenderTarget := 0x%.08X\n", GetCurrentThreadId(), pSurface8); + DbgPrintf("EmuD3D8: RenderTarget := 0x%.08X\n", pSurface8); @@ -2288,11 +2287,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetDepthStencilSurface { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetDepthStencilSurface\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetDepthStencilSurface\n" "(\n" " ppZStencilSurface : 0x%.08X\n" ");\n", - GetCurrentThreadId(), ppZStencilSurface); + ppZStencilSurface); IDirect3DSurface8 *pSurface8 = g_pCachedZStencilSurface->EmuSurface8; @@ -2301,7 +2300,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetDepthStencilSurface *ppZStencilSurface = g_pCachedZStencilSurface; - DbgPrintf("EmuD3D8 (0x%X): DepthStencilSurface := 0x%.08X\n", GetCurrentThreadId(), pSurface8); + DbgPrintf("EmuD3D8: DepthStencilSurface := 0x%.08X\n", pSurface8); @@ -2315,14 +2314,14 @@ XTL::X_D3DSurface * WINAPI XTL::EmuIDirect3DDevice8_GetDepthStencilSurface2() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetDepthStencilSurface2()\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetDepthStencilSurface2()\n"); IDirect3DSurface8 *pSurface8 = g_pCachedZStencilSurface->EmuSurface8; if(pSurface8 != 0) pSurface8->AddRef(); - DbgPrintf("EmuD3D8 (0x%X): DepthStencilSurface := 0x%.08X\n", GetCurrentThreadId(), pSurface8); + DbgPrintf("EmuD3D8: DepthStencilSurface := 0x%.08X\n", pSurface8); @@ -2340,12 +2339,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetTile { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetTile\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetTile\n" "(\n" " Index : 0x%.08X\n" " pTile : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Index, pTile); + Index, pTile); if(pTile != NULL) memcpy(pTile, &EmuD3DTileCache[Index], sizeof(X_D3DTILE)); @@ -2366,12 +2365,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetTileNoWait { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetTileNoWait\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetTileNoWait\n" "(\n" " Index : 0x%.08X\n" " pTile : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Index, pTile); + Index, pTile); if(pTile != NULL) memcpy(&EmuD3DTileCache[Index], pTile, sizeof(X_D3DTILE)); @@ -2394,14 +2393,14 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateVertexShader { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreateVertexShader\n" + DbgPrintf("EmuD3D8: 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); + pDeclaration, pFunction, pHandle, Usage); // create emulated shader struct X_D3DVertexShader *pD3DVertexShader = (X_D3DVertexShader*)CxbxMalloc(sizeof(X_D3DVertexShader)); @@ -2453,7 +2452,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateVertexShader else { pRecompiledFunction = NULL; - EmuWarning("Couldn't recompile vertex shader function.\n"); + EmuWarning("Couldn't recompile vertex shader function."); hRet = D3D_OK; // Try using a fixed function vertex shader instead } } @@ -2482,7 +2481,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateVertexShader "vs.1.1\n" "mov oPos, v0\n"; - EmuWarning("Trying fallback:\n%s\n", dummy); + EmuWarning("Trying fallback:\n%s", dummy); hRet = D3DXAssembleShader(dummy, strlen(dummy), D3DXASM_SKIPVALIDATION, @@ -2576,13 +2575,13 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetPixelShaderConstant { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetPixelShaderConstant\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetPixelShaderConstant\n" "(\n" " Register : 0x%.08X\n" " pConstantData : 0x%.08X\n" " ConstantCount : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Register, pConstantData, ConstantCount); + Register, pConstantData, ConstantCount); // TODO: This hack is necessary for Vertex Shaders on XDKs prior to 4361, but if this // causes problems with pixel shaders, feel free to comment out the hack below. @@ -2620,13 +2619,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexShaderConstant { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexShaderConstant\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetVertexShaderConstant\n" "(\n" " Register : 0x%.08X\n" " pConstantData : 0x%.08X\n" " ConstantCount : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Register, pConstantData, ConstantCount); + Register, pConstantData, ConstantCount); /*#ifdef _DEBUG_TRACK_VS_CONST for (uint32 i = 0; i < ConstantCount; i++) @@ -2675,12 +2674,12 @@ VOID __fastcall XTL::EmuIDirect3DDevice8_SetVertexShaderConstant1 CONST PVOID pConstantData ) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexShaderConstant1\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetVertexShaderConstant1\n" "(\n" " Register : 0x%.08X\n" " pConstantData : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Register, pConstantData); + Register, pConstantData); XTL::EmuIDirect3DDevice8_SetVertexShaderConstant(Register, pConstantData, 1); @@ -2696,12 +2695,12 @@ VOID __fastcall XTL::EmuIDirect3DDevice8_SetVertexShaderConstant4 CONST PVOID pConstantData ) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexShaderConstant4\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetVertexShaderConstant4\n" "(\n" " Register : 0x%.08X\n" " pConstantData : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Register, pConstantData); + Register, pConstantData); XTL::EmuIDirect3DDevice8_SetVertexShaderConstant(Register, pConstantData, 4); @@ -2718,13 +2717,13 @@ VOID __fastcall XTL::EmuIDirect3DDevice8_SetVertexShaderConstantNotInline DWORD ConstantCount ) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexShaderConstantNotInline\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetVertexShaderConstantNotInline\n" "(\n" " Register : 0x%.08X\n" " pConstantData : 0x%.08X\n" " ConstantCount : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Register, pConstantData, ConstantCount); + Register, pConstantData, ConstantCount); XTL::EmuIDirect3DDevice8_SetVertexShaderConstant(Register, pConstantData, ConstantCount / 4); @@ -2741,11 +2740,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_DeletePixelShader { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_DeletePixelShader\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_DeletePixelShader\n" "(\n" " Handle : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Handle); + Handle); if(Handle == X_PIXELSHADER_FAKE_HANDLE) { @@ -2783,12 +2782,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreatePixelShader { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreatePixelShader\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_CreatePixelShader\n" "(\n" " pPSDef : 0x%.08X\n" " pHandle : 0x%.08X (0x%.08X)\n" ");\n", - GetCurrentThreadId(), pPSDef, pHandle, *pHandle); + pPSDef, pHandle, *pHandle); HRESULT hRet = E_FAIL; DWORD* pFunction = NULL; @@ -2875,11 +2874,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetPixelShader { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetPixelShader\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetPixelShader\n" "(\n" " Handle : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Handle); + Handle); // Redirect to Windows D3D HRESULT hRet = D3D_OK; @@ -2996,7 +2995,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateTexture { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreateTexture\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_CreateTexture\n" "(\n" " Width : 0x%.08X\n" " Height : 0x%.08X\n" @@ -3006,7 +3005,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateTexture " Pool : 0x%.08X\n" " ppTexture : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Width, Height, Levels, Usage, Format, Pool, ppTexture); + Width, Height, Levels, Usage, Format, Pool, ppTexture); // Convert Format (Xbox->PC) D3DFORMAT PCFormat = EmuXB2PC_D3DFormat(Format); @@ -3104,7 +3103,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateTexture (*ppTexture)->EmuTexture8->UnlockRect(0); } - DbgPrintf("EmuD3D8 (0x%X): Created Texture : 0x%.08X (0x%.08X)\n", GetCurrentThreadId(), *ppTexture, (*ppTexture)->EmuTexture8); + DbgPrintf("EmuD3D8: Created Texture : 0x%.08X (0x%.08X)\n", *ppTexture, (*ppTexture)->EmuTexture8); } else { @@ -3154,7 +3153,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateVolumeTexture { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreateVolumeTexture\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_CreateVolumeTexture\n" "(\n" " Width : 0x%.08X\n" " Height : 0x%.08X\n" @@ -3165,7 +3164,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateVolumeTexture " Pool : 0x%.08X\n" " ppVolumeTexture : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Width, Height, Depth, Levels, Usage, Format, Pool, ppVolumeTexture); + Width, Height, Depth, Levels, Usage, Format, Pool, ppVolumeTexture); // Convert Format (Xbox->PC) D3DFORMAT PCFormat = EmuXB2PC_D3DFormat(Format); @@ -3212,7 +3211,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateVolumeTexture if(FAILED(hRet)) EmuWarning("CreateVolumeTexture Failed! (0x%.08X)", hRet); - DbgPrintf("EmuD3D8 (0x%X): Created Volume Texture : 0x%.08X (0x%.08X)\n", GetCurrentThreadId(), *ppVolumeTexture, (*ppVolumeTexture)->EmuVolumeTexture8); + DbgPrintf("EmuD3D8: Created Volume Texture : 0x%.08X (0x%.08X)\n", *ppVolumeTexture, (*ppVolumeTexture)->EmuVolumeTexture8); } else { @@ -3256,7 +3255,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateCubeTexture { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreateCubeTexture\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_CreateCubeTexture\n" "(\n" " EdgeLength : 0x%.08X\n" " Levels : 0x%.08X\n" @@ -3265,7 +3264,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateCubeTexture " Pool : 0x%.08X\n" " ppCubeTexture : 0x%.08X\n" ");\n", - GetCurrentThreadId(), EdgeLength, Levels, Usage, Format, Pool, ppCubeTexture); + EdgeLength, Levels, Usage, Format, Pool, ppCubeTexture); // Convert Format (Xbox->PC) D3DFORMAT PCFormat = EmuXB2PC_D3DFormat(Format); @@ -3300,7 +3299,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateCubeTexture PCFormat, D3DPOOL_MANAGED, &((*ppCubeTexture)->EmuCubeTexture8) ); - DbgPrintf("EmuD3D8 (0x%X): Created Cube Texture : 0x%.08X (0x%.08X)\n", GetCurrentThreadId(), *ppCubeTexture, (*ppCubeTexture)->EmuCubeTexture8); + DbgPrintf("EmuD3D8: Created Cube Texture : 0x%.08X (0x%.08X)\n", *ppCubeTexture, (*ppCubeTexture)->EmuCubeTexture8); if(FAILED(hRet)) EmuWarning("CreateCubeTexture Failed!"); @@ -3324,7 +3323,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateIndexBuffer { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreateIndexBuffer\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_CreateIndexBuffer\n" "(\n" " Length : 0x%.08X\n" " Usage : 0x%.08X\n" @@ -3332,7 +3331,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateIndexBuffer " Pool : 0x%.08X\n" " ppIndexBuffer : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Length, Usage, Format, Pool, ppIndexBuffer); + Length, Usage, Format, Pool, ppIndexBuffer); *ppIndexBuffer = new X_D3DIndexBuffer(); @@ -3341,7 +3340,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateIndexBuffer Length, NULL, D3DFMT_INDEX16, D3DPOOL_MANAGED, &((*ppIndexBuffer)->EmuIndexBuffer8) ); - DbgPrintf("EmuD3D8 (0x%X): EmuIndexBuffer8 := 0x%.08X\n", GetCurrentThreadId(), (*ppIndexBuffer)->EmuIndexBuffer8); + DbgPrintf("EmuD3D8: EmuIndexBuffer8 := 0x%.08X\n", (*ppIndexBuffer)->EmuIndexBuffer8); if(FAILED(hRet)) EmuWarning("CreateIndexBuffer Failed! (0x%.08X)", hRet); @@ -3395,12 +3394,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetIndices { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetIndices\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetIndices\n" "(\n" " pIndexData : 0x%.08X\n" " BaseVertexIndex : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pIndexData, BaseVertexIndex); + pIndexData, BaseVertexIndex); /* fflush(stdout); @@ -3472,12 +3471,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetTexture { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetTexture\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetTexture\n" "(\n" " Stage : 0x%.08X\n" " pTexture : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Stage, pTexture); + Stage, pTexture); IDirect3DBaseTexture8 *pBaseTexture8 = NULL; @@ -3598,13 +3597,13 @@ VOID __fastcall XTL::EmuIDirect3DDevice8_SwitchTexture { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SwitchTexture\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SwitchTexture\n" "(\n" " Method : 0x%.08X\n" " Data : 0x%.08X\n" " Format : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Method, Data, Format); + Method, Data, Format); DWORD StageLookup[] = { 0x00081b00, 0x00081b40, 0x00081b80, 0x00081bc0 }; DWORD Stage = -1; @@ -3664,11 +3663,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetDisplayMode { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetDisplayMode\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetDisplayMode\n" "(\n" " pMode : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pMode); + pMode); HRESULT hRet; @@ -3704,11 +3703,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_Begin { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_Begin\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_Begin\n" "(\n" " PrimitiveType : 0x%.08X\n" ");\n", - GetCurrentThreadId(), PrimitiveType); + PrimitiveType); g_IVBPrimitiveType = PrimitiveType; @@ -3743,13 +3742,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexData2f FLOAT b ) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexData2f >>\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetVertexData2f >>\n" "(\n" " Register : 0x%.08X\n" " a : %f\n" " b : %f\n" ");\n", - GetCurrentThreadId(), Register, a, b); + Register, a, b); return EmuIDirect3DDevice8_SetVertexData4f(Register, a, b, 0.0f, 1.0f); } @@ -3767,13 +3766,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexData2s SHORT b ) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexData2s >>\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetVertexData2s >>\n" "(\n" " Register : 0x%.08X\n" " a : %d\n" " b : %d\n" ");\n", - GetCurrentThreadId(), Register, a, b); + Register, a, b); DWORD dwA = a, dwB = b; @@ -3794,7 +3793,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexData4f { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexData4f\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetVertexData4f\n" "(\n" " Register : 0x%.08X\n" " a : %f\n" @@ -3802,7 +3801,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexData4f " c : %f\n" " d : %f\n" ");\n", - GetCurrentThreadId(), Register, a, b, c, d); + Register, a, b, c, d); HRESULT hRet = S_OK; @@ -3982,7 +3981,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexData4ub { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexData4ub\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetVertexData4ub\n" "(\n" " Register : 0x%.08X\n" " a : 0x%.02X\n" @@ -3990,7 +3989,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexData4ub " c : 0x%.02X\n" " d : 0x%.02X\n" ");\n", - GetCurrentThreadId(), Register, a, b, c, d); + Register, a, b, c, d); @@ -4013,7 +4012,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexData4s { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexData4s\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetVertexData4s\n" "(\n" " Register : 0x%.08X\n" " a : 0x%.04X\n" @@ -4021,7 +4020,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexData4s " c : 0x%.04X\n" " d : 0x%.04X\n" ");\n", - GetCurrentThreadId(), Register, a, b, c, d); + Register, a, b, c, d); @@ -4039,12 +4038,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexDataColor D3DCOLOR Color ) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexDataColor >>\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetVertexDataColor >>\n" "(\n" " Register : 0x%.08X\n" " Color : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Register, Color); + Register, Color); FLOAT a = DWtoF((Color & 0xFF000000) >> 24); FLOAT r = DWtoF((Color & 0x00FF0000) >> 16); @@ -4061,7 +4060,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_End() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_End();\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_End();\n"); if(g_IVBTblOffs != 0) EmuFlushIVB(); @@ -4086,12 +4085,12 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_RunPushBuffer { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_RunPushBuffer\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_RunPushBuffer\n" "(\n" " pPushBuffer : 0x%.08X\n" " pFixup : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pPushBuffer, pFixup); + pPushBuffer, pFixup); XTL::EmuExecutePushBuffer(pPushBuffer, pFixup); @@ -4115,7 +4114,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_Clear { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_Clear\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_Clear\n" "(\n" " Count : 0x%.08X\n" " pRects : 0x%.08X\n" @@ -4124,7 +4123,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_Clear " Z : %f\n" " Stencil : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Count, pRects, Flags, + Count, pRects, Flags, Color, Z, Stencil); // make adjustments to parameters to make sense with windows d3d @@ -4184,14 +4183,14 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_Present { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_Present\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_Present\n" "(\n" " pSourceRect : 0x%.08X\n" " pDestRect : 0x%.08X\n" " pDummy1 : 0x%.08X\n" " pDummy2 : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pSourceRect, pDestRect, pDummy1, pDummy2); + pSourceRect, pDestRect, pDummy1, pDummy2); HRESULT hRet = S_OK; @@ -4263,11 +4262,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_Swap { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_Swap\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_Swap\n" "(\n" " Flags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Flags); + Flags); // TODO: Ensure this flag is always the same across library versions if(Flags != 0) @@ -4320,12 +4319,12 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DResource8_Register\n" + DbgPrintf("EmuD3D8: EmuIDirect3DResource8_Register\n" "(\n" " pThis : 0x%.08X (->Data : 0x%.08X)\n" " pBase : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pThis->Data, pBase); + pThis, pThis->Data, pBase); HRESULT hRet = S_OK; @@ -4341,7 +4340,7 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register { case X_D3DCOMMON_TYPE_VERTEXBUFFER: { - DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Creating VertexBuffer...\n", GetCurrentThreadId()); + DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Creating VertexBuffer...\n"); X_D3DVertexBuffer *pVertexBuffer = (X_D3DVertexBuffer*)pResource; @@ -4394,7 +4393,7 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register pResource->Data = (ULONG)pData; } - DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created VertexBuffer (0x%.08X)\n", GetCurrentThreadId(), pResource->EmuVertexBuffer8); + DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created VertexBuffer (0x%.08X)\n", pResource->EmuVertexBuffer8); } break; @@ -4446,7 +4445,7 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register pResource->Data = (ULONG)pData; } - DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created IndexBuffer (0x%.08X)\n", GetCurrentThreadId(), pResource->EmuIndexBuffer8); + DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created IndexBuffer (0x%.08X)\n", pResource->EmuIndexBuffer8); } break; @@ -4473,7 +4472,7 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register pResource->Data = (ULONG)pBase; } - DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created PushBuffer (0x%.08X, 0x%.08X, 0x%.08X)\n", GetCurrentThreadId(), pResource->Data, pPushBuffer->Size, pPushBuffer->AllocationSize); + DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created PushBuffer (0x%.08X, 0x%.08X, 0x%.08X)\n", pResource->Data, pPushBuffer->Size, pPushBuffer->AllocationSize); } break; @@ -4661,8 +4660,8 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register DXGetErrorString8A(hRet), DXGetErrorDescription8A(hRet)*/); ; - DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created ImageSurface (0x%.08X, 0x%.08X)\n", GetCurrentThreadId(), pResource, pResource->EmuSurface8); - DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Width : %d, Height : %d, Format : %d\n", GetCurrentThreadId(), dwWidth, dwHeight, Format); + DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created ImageSurface (0x%.08X, 0x%.08X)\n", pResource, pResource->EmuSurface8); + DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Width : %d, Height : %d, Format : %d\n", dwWidth, dwHeight, Format); } else { @@ -4715,7 +4714,7 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register CxbxKrnlCleanup("CreateCubeTexture Failed!\n\nError: \nDesc: "/*, DXGetErrorString8A(hRet), DXGetErrorDescription8A(hRet)*/); - DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created CubeTexture (0x%.08X, 0x%.08X)\n", GetCurrentThreadId(), pResource, pResource->EmuCubeTexture8); + DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created CubeTexture (0x%.08X, 0x%.08X)\n", pResource, pResource->EmuCubeTexture8); } else { @@ -4748,7 +4747,7 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register CxbxKrnlCleanup("CreateTexture Failed!\n\nError: \nDesc: "/*, DXGetErrorString8A(hRet), DXGetErrorDescription8A(hRet)*/); - DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created Texture (0x%.08X, 0x%.08X)\n", GetCurrentThreadId(), pResource, pResource->EmuTexture8); + DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created Texture (0x%.08X, 0x%.08X)\n", pResource, pResource->EmuTexture8); } } @@ -5013,7 +5012,7 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register pResource->Data = (ULONG)pBase; } - //DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created Palette (0x%.08X, 0x%.08X, 0x%.08X)\n", GetCurrentThreadId(), pResource->Data, pResource->Size, pResource->AllocationSize); + //DbgPrintf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created Palette (0x%.08X, 0x%.08X, 0x%.08X)\n", pResource->Data, pResource->Size, pResource->AllocationSize); } break; @@ -5049,11 +5048,11 @@ ULONG WINAPI XTL::EmuIDirect3DResource8_AddRef { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DResource8_AddRef\n" + DbgPrintf("EmuD3D8: EmuIDirect3DResource8_AddRef\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); ULONG uRet = 0; @@ -5100,11 +5099,11 @@ ULONG WINAPI XTL::EmuIDirect3DResource8_Release { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DResource8_Release\n" + DbgPrintf("EmuD3D8: EmuIDirect3DResource8_Release\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); ULONG uRet = 0; @@ -5121,7 +5120,7 @@ ULONG WINAPI XTL::EmuIDirect3DResource8_Release // HACK: Clone textures generated by D3DDevice::GetTexture2 if(IsSpecialResource(pThis->Data) && (pThis->Data & X_D3DRESOURCE_DATA_FLAG_TEXCLON)) { - EmuWarning( "Deleting clone texture (from D3DDevice::GetTexture2)...\n" ); + EmuWarning( "Deleting clone texture (from D3DDevice::GetTexture2)..." ); // uRet = pThis->EmuBaseTexture8->Release(); delete pThis; } @@ -5171,7 +5170,7 @@ ULONG WINAPI XTL::EmuIDirect3DResource8_Release if(uRet == 0) { - DbgPrintf("EmuIDirect3DResource8_Release (0x%X): Cleaned up a Resource!\n", GetCurrentThreadId()); + DbgPrintf("EmuIDirect3DResource8_Release (0x%X): Cleaned up a Resource!\n"); #ifdef _DEBUG_TRACE_VB if(Type == D3DRTYPE_VERTEXBUFFER) @@ -5205,11 +5204,11 @@ BOOL WINAPI XTL::EmuIDirect3DResource8_IsBusy /* too much output - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DResource8_IsBusy\n" + DbgPrintf("EmuD3D8: EmuIDirect3DResource8_IsBusy\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); //*/ IDirect3DResource8 *pResource8 = pThis->EmuResource8; @@ -5229,11 +5228,11 @@ XTL::X_D3DRESOURCETYPE WINAPI XTL::EmuIDirect3DResource8_GetType { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DResource8_GetType\n" + DbgPrintf("EmuD3D8: EmuIDirect3DResource8_GetType\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); D3DRESOURCETYPE rType; @@ -5272,7 +5271,7 @@ VOID WINAPI XTL::EmuLock2DSurface { - DbgPrintf("EmuD3D8 (0x%X): EmuLock2DSurface\n" + DbgPrintf("EmuD3D8: EmuLock2DSurface\n" "(\n" " pPixelContainer : 0x%.08X\n" " FaceType : 0x%.08X\n" @@ -5281,7 +5280,7 @@ VOID WINAPI XTL::EmuLock2DSurface " pRect : 0x%.08X\n" " Flags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pPixelContainer, FaceType, Level, pLockedRect, pRect, Flags); + pPixelContainer, FaceType, Level, pLockedRect, pRect, Flags); EmuVerifyResourceIsRegistered(pPixelContainer); @@ -5306,7 +5305,7 @@ VOID WINAPI XTL::EmuLock3DSurface { - DbgPrintf("EmuD3D8 (0x%X): EmuLock2DSurface\n" + DbgPrintf("EmuD3D8: EmuLock2DSurface\n" "(\n" " pPixelContainer : 0x%.08X\n" " Level : 0x%.08X\n" @@ -5314,7 +5313,7 @@ VOID WINAPI XTL::EmuLock3DSurface " pBox : 0x%.08X\n" " Flags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pPixelContainer, Level, pLockedVolume, pBox, Flags); + pPixelContainer, Level, pLockedVolume, pBox, Flags); EmuVerifyResourceIsRegistered(pPixelContainer); @@ -5339,13 +5338,13 @@ VOID WINAPI XTL::EmuGet2DSurfaceDesc { - DbgPrintf("EmuD3D8 (0x%X): EmuGet2DSurfaceDesc\n" + DbgPrintf("EmuD3D8: EmuGet2DSurfaceDesc\n" "(\n" " pPixelContainer : 0x%.08X\n" " dwLevel : 0x%.08X\n" " pDesc : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pPixelContainer, dwLevel, pDesc); + pPixelContainer, dwLevel, pDesc); EmuVerifyResourceIsRegistered(pPixelContainer); @@ -5439,12 +5438,12 @@ VOID WINAPI XTL::EmuGet2DSurfaceDescD X_D3DSURFACE_DESC *pDesc ) { - DbgPrintf("EmuD3D8 (0x%X): EmuGet2DSurfaceDescD\n" + DbgPrintf("EmuD3D8: EmuGet2DSurfaceDescD\n" "(\n" " pPixelContainer : 0x%.08X\n" " pDesc : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pPixelContainer, pDesc); + pPixelContainer, pDesc); EmuGet2DSurfaceDesc(pPixelContainer, 0xFEFEFEFE, pDesc); @@ -5462,12 +5461,12 @@ HRESULT WINAPI XTL::EmuIDirect3DSurface8_GetDesc { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DSurface8_GetDesc\n" + DbgPrintf("EmuD3D8: EmuIDirect3DSurface8_GetDesc\n" "(\n" " pThis : 0x%.08X\n" " pDesc : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pDesc); + pThis, pDesc); HRESULT hRet; @@ -5534,18 +5533,18 @@ HRESULT WINAPI XTL::EmuIDirect3DSurface8_LockRect { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DSurface8_LockRect\n" + DbgPrintf("EmuD3D8: EmuIDirect3DSurface8_LockRect\n" "(\n" " pThis : 0x%.08X\n" " pLockedRect : 0x%.08X\n" " pRect : 0x%.08X\n" " Flags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pLockedRect, pRect, Flags); + pThis, pLockedRect, pRect, Flags); HRESULT hRet; -// DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DSurface8_LockRect (pThis->Surface = 0x%8.8X)\n", pThis->EmuSurface8 ); +// DbgPrintf("EmuD3D8: EmuIDirect3DSurface8_LockRect (pThis->Surface = 0x%8.8X)\n", pThis->EmuSurface8 ); if(!pThis->EmuSurface8) { @@ -5610,11 +5609,11 @@ DWORD WINAPI XTL::EmuIDirect3DBaseTexture8_GetLevelCount { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DBaseTexture8_GetLevelCount\n" + DbgPrintf("EmuD3D8: EmuIDirect3DBaseTexture8_GetLevelCount\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); DWORD dwRet = 0; @@ -5676,7 +5675,7 @@ HRESULT WINAPI XTL::EmuIDirect3DTexture8_LockRect { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DTexture8_LockRect\n" + DbgPrintf("EmuD3D8: EmuIDirect3DTexture8_LockRect\n" "(\n" " pThis : 0x%.08X\n" " Level : 0x%.08X\n" @@ -5684,11 +5683,11 @@ HRESULT WINAPI XTL::EmuIDirect3DTexture8_LockRect " pRect : 0x%.08X\n" " Flags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, Level, pLockedRect, pRect, Flags); + pThis, Level, pLockedRect, pRect, Flags); HRESULT hRet = D3D_OK; - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DTexture8_LockRect (pThis->Texture = 0x%8.8X)\n", GetCurrentThreadId(), pThis->EmuTexture8); + DbgPrintf("EmuD3D8: EmuIDirect3DTexture8_LockRect (pThis->Texture = 0x%8.8X)\n", pThis->EmuTexture8); EmuVerifyResourceIsRegistered(pThis); @@ -5744,13 +5743,13 @@ HRESULT WINAPI XTL::EmuIDirect3DTexture8_GetSurfaceLevel { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DTexture8_GetSurfaceLevel\n" + DbgPrintf("EmuD3D8: EmuIDirect3DTexture8_GetSurfaceLevel\n" "(\n" " pThis : 0x%.08X\n" " Level : 0x%.08X\n" " ppSurfaceLevel : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, Level, ppSurfaceLevel); + pThis, Level, ppSurfaceLevel); HRESULT hRet; @@ -5787,11 +5786,11 @@ HRESULT WINAPI XTL::EmuIDirect3DTexture8_GetSurfaceLevel if(FAILED(hRet)) { - EmuWarning("EmuIDirect3DTexture8_GetSurfaceLevel Failed!\n"); + EmuWarning("EmuIDirect3DTexture8_GetSurfaceLevel Failed!"); } else { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DTexture8_GetSurfaceLevel := 0x%.08X\n", GetCurrentThreadId(), (*ppSurfaceLevel)->EmuSurface8); + DbgPrintf("EmuD3D8: EmuIDirect3DTexture8_GetSurfaceLevel := 0x%.08X\n", (*ppSurfaceLevel)->EmuSurface8); } } } @@ -5815,7 +5814,7 @@ HRESULT WINAPI XTL::EmuIDirect3DVolumeTexture8_LockBox { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DVolumeTexture8_LockBox\n" + DbgPrintf("EmuD3D8: EmuIDirect3DVolumeTexture8_LockBox\n" "(\n" " pThis : 0x%.08X\n" " Level : 0x%.08X\n" @@ -5823,7 +5822,7 @@ HRESULT WINAPI XTL::EmuIDirect3DVolumeTexture8_LockBox " pBox : 0x%.08X\n" " Flags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, Level, pLockedVolume, pBox, Flags); + pThis, Level, pLockedVolume, pBox, Flags); EmuVerifyResourceIsRegistered(pThis); @@ -5854,7 +5853,7 @@ HRESULT WINAPI XTL::EmuIDirect3DCubeTexture8_LockRect { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DCubeTexture8_LockRect\n" + DbgPrintf("EmuD3D8: EmuIDirect3DCubeTexture8_LockRect\n" "(\n" " pThis : 0x%.08X\n" " FaceType : 0x%.08X\n" @@ -5863,7 +5862,7 @@ HRESULT WINAPI XTL::EmuIDirect3DCubeTexture8_LockRect " pRect : 0x%.08X\n" " Flags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, FaceType, Level, pLockedBox, pRect, Flags); + pThis, FaceType, Level, pLockedBox, pRect, Flags); EmuVerifyResourceIsRegistered(pThis); @@ -5883,7 +5882,7 @@ ULONG WINAPI XTL::EmuIDirect3DDevice8_Release() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_Release();\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_Release();\n"); g_pD3DDevice8->AddRef(); DWORD RefCount = g_pD3DDevice8->Release(); @@ -5934,11 +5933,11 @@ XTL::X_D3DVertexBuffer* WINAPI XTL::EmuIDirect3DDevice8_CreateVertexBuffer2 { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreateVertexBuffer2\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_CreateVertexBuffer2\n" "(\n" " Length : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Length); + Length); X_D3DVertexBuffer *pD3DVertexBuffer = new X_D3DVertexBuffer(); @@ -5973,11 +5972,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_EnableOverlay { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_EnableOverlay\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_EnableOverlay\n" "(\n" " Enable : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Enable); + Enable); if(Enable == FALSE && (g_pDDSOverlay7 != NULL)) { @@ -6048,7 +6047,7 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_UpdateOverlay { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_UpdateOverlay\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_UpdateOverlay\n" "(\n" " pSurface : 0x%.08X\n" " SrcRect : 0x%.08X\n" @@ -6056,7 +6055,7 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_UpdateOverlay " EnableColorKey : 0x%.08X\n" " ColorKey : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pSurface, SrcRect, DstRect, EnableColorKey, ColorKey); + pSurface, SrcRect, DstRect, EnableColorKey, ColorKey); if(pSurface) { @@ -6243,8 +6242,7 @@ BOOL WINAPI XTL::EmuIDirect3DDevice8_GetOverlayUpdateStatus() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetOverlayUpdateStatus();\n", - GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetOverlayUpdateStatus();\n"); @@ -6259,8 +6257,7 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_BlockUntilVerticalBlank() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_BlockUntilVerticalBlank();\n", - GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_BlockUntilVerticalBlank();\n"); // segaGT tends to freeze with this on // if(g_XBVideo.GetVSync()) @@ -6290,11 +6287,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetVerticalBlankCallback { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVerticalBlankCallback\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetVerticalBlankCallback\n" "(\n" " pCallback : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pCallback); + pCallback); g_pVBCallback = pCallback; @@ -6314,12 +6311,12 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetTextureState_TexCoordIndex { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetTextureState_TexCoordIndex\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetTextureState_TexCoordIndex\n" "(\n" " Stage : 0x%.08X\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Stage, Value); + Stage, Value); // TODO: Xbox Direct3D supports sphere mapping OpenGL style. @@ -6346,11 +6343,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetTextureState_TwoSidedLighting { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetTextureState_TwoSidedLighting\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetTextureState_TwoSidedLighting\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); EmuWarning("TwoSidedLighting is not supported!"); @@ -6369,11 +6366,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_BackFillMode { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_BackFillMode\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_BackFillMode\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); EmuWarning("BackFillMode is not supported!"); @@ -6393,12 +6390,12 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetTextureState_BorderColor { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetTextureState_BorderColor\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetTextureState_BorderColor\n" "(\n" " Stage : 0x%.08X\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Stage, Value); + Stage, Value); g_pD3DDevice8->SetTextureStageState(Stage, D3DTSS_BORDERCOLOR, Value); @@ -6418,12 +6415,12 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetTextureState_ColorKeyColor { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetTextureState_ColorKeyColor\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetTextureState_ColorKeyColor\n" "(\n" " Stage : 0x%.08X\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Stage, Value); + Stage, Value); EmuWarning("SetTextureState_ColorKeyColor is not supported!"); @@ -6444,13 +6441,13 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetTextureState_BumpEnv { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetTextureState_BumpEnv\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetTextureState_BumpEnv\n" "(\n" " Stage : 0x%.08X\n" " Type : 0x%.08X\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Stage, Type, Value); + Stage, Type, Value); switch(Type) { @@ -6486,13 +6483,13 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_FrontFace { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_FrontFace\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_FrontFace\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); - EmuWarning("SetRenderState_FrontFace not supported!\n"); + EmuWarning("SetRenderState_FrontFace not supported!"); @@ -6509,11 +6506,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_LogicOp { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_LogicOp\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_LogicOp\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); EmuWarning("SetRenderState_LogicOp is not supported!"); @@ -6532,11 +6529,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_NormalizeNormals { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_NormalizeNormals\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_NormalizeNormals\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); g_pD3DDevice8->SetRenderState(D3DRS_NORMALIZENORMALS, Value); @@ -6555,11 +6552,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_TextureFactor { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_TextureFactor\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_TextureFactor\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); g_pD3DDevice8->SetRenderState(D3DRS_TEXTUREFACTOR, Value); @@ -6578,11 +6575,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_ZBias { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_ZBias\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_ZBias\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); g_pD3DDevice8->SetRenderState(D3DRS_ZBIAS, Value); @@ -6601,11 +6598,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_EdgeAntiAlias { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_EdgeAntiAlias\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_EdgeAntiAlias\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); // TODO: Analyze performance and compatibility (undefined behavior on PC with triangles or points) // g_pD3DDevice8->SetRenderState(D3DRS_EDGEANTIALIAS, Value); @@ -6627,11 +6624,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_FillMode { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_FillMode\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_FillMode\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); DWORD dwFillMode; @@ -6659,11 +6656,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_FogColor { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_FogColor\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_FogColor\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); g_pD3DDevice8->SetRenderState(D3DRS_FOGCOLOR, Value); @@ -6682,11 +6679,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_Dxt1NoiseEnable { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_Dxt1NoiseEnable\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_Dxt1NoiseEnable\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); EmuWarning("SetRenderState_Dxt1NoiseEnable not implemented!"); @@ -6706,12 +6703,12 @@ VOID __fastcall XTL::EmuIDirect3DDevice8_SetRenderState_Simple { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_Simple\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_Simple\n" "(\n" " Method : 0x%.08X\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Method, Value); + Method, Value); int State = -1; @@ -6851,11 +6848,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_VertexBlend { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_VertexBlend\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_VertexBlend\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); // convert from Xbox direct3d to PC direct3d enumeration if(Value <= 1) @@ -6884,11 +6881,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_PSTextureModes { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_PSTextureModes\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_PSTextureModes\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); // TODO: do something.. @@ -6907,11 +6904,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_CullMode { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_CullMode\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_CullMode\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); // convert from Xbox D3D to PC D3D enumeration // TODO: XDK-Specific Tables? So far they are the same @@ -6947,11 +6944,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_LineWidth { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_LineWidth\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_LineWidth\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); // TODO: Convert to PC format?? // g_pD3DDevice8->SetRenderState(D3DRS_LINEPATTERN, Value); @@ -6972,11 +6969,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_StencilFail { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_StencilFail\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_StencilFail\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); g_pD3DDevice8->SetRenderState(D3DRS_STENCILFAIL, Value); @@ -6995,11 +6992,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_OcclusionCullEnable { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_OcclusionCullEnable\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_OcclusionCullEnable\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); EmuWarning("SetRenderState_OcclusionCullEnable not supported!"); @@ -7018,11 +7015,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_StencilCullEnable { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_StencilCullEnable\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_StencilCullEnable\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); EmuWarning("SetRenderState_StencilCullEnable not supported!"); @@ -7041,11 +7038,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); EmuWarning("SetRenderState_RopZCmpAlwaysRead not supported!"); @@ -7064,11 +7061,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_RopZRead { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_RopZRead\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_RopZRead\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); EmuWarning("SetRenderState_RopZRead not supported!"); @@ -7087,11 +7084,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_DoNotCullUncompressed { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_DoNotCullUncompressed\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_DoNotCullUncompressed\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); EmuWarning("SetRenderState_DoNotCullUncompressed not supported!"); @@ -7110,11 +7107,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_ZEnable { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_ZEnable\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_ZEnable\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); g_pD3DDevice8->SetRenderState(D3DRS_ZENABLE, Value); @@ -7133,11 +7130,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_StencilEnable { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_StencilEnable\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_StencilEnable\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); g_pD3DDevice8->SetRenderState(D3DRS_STENCILENABLE, Value); @@ -7156,11 +7153,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); g_pD3DDevice8->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, Value); @@ -7179,11 +7176,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_MultiSampleMask { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_MultiSampleMask\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_MultiSampleMask\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); g_pD3DDevice8->SetRenderState(D3DRS_MULTISAMPLEMASK, Value); @@ -7202,11 +7199,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_MultiSampleMode { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_MultiSampleMode\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_MultiSampleMode\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); EmuWarning("SetRenderState_MultiSampleMode is not supported!"); @@ -7225,11 +7222,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_MultiSampleRenderTargetMode { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_MultiSampleRenderTargetMode\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_MultiSampleRenderTargetMode\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); EmuWarning("SetRenderState_MultiSampleRenderTargetMode is not supported!"); @@ -7248,11 +7245,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_ShadowFunc { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_ShadowFunc\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_ShadowFunc\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); // ShadowFunc reflects the following Xbox-only extension // @@ -7286,11 +7283,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_YuvEnable { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_YuvEnable\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_YuvEnable\n" "(\n" " Enable : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Enable); + Enable); // HACK: Display YUV surface by using an overlay. if(Enable != g_fYuvEnabled) @@ -7327,12 +7324,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetTransform { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetTransform\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetTransform\n" "(\n" " State : 0x%.08X\n" " pMatrix : 0x%.08X\n" ");\n", - GetCurrentThreadId(), State, pMatrix); + State, pMatrix); /* printf("pMatrix (%d)\n", State); @@ -7375,12 +7372,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetTransform { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetTransform\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetTransform\n" "(\n" " State : 0x%.08X\n" " pMatrix : 0x%.08X\n" ");\n", - GetCurrentThreadId(), State, pMatrix); + State, pMatrix); State = EmuXB2PC_D3DTS(State); @@ -7405,7 +7402,7 @@ VOID WINAPI XTL::EmuIDirect3DVertexBuffer8_Lock { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DVertexBuffer8_Lock\n" + DbgPrintf("EmuD3D8: EmuIDirect3DVertexBuffer8_Lock\n" "(\n" " ppVertexBuffer : 0x%.08X\n" " OffsetToLock : 0x%.08X\n" @@ -7413,7 +7410,7 @@ VOID WINAPI XTL::EmuIDirect3DVertexBuffer8_Lock " ppbData : 0x%.08X\n" " Flags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), ppVertexBuffer, OffsetToLock, SizeToLock, ppbData, Flags); + ppVertexBuffer, OffsetToLock, SizeToLock, ppbData, Flags); IDirect3DVertexBuffer8 *pVertexBuffer8 = ppVertexBuffer->EmuVertexBuffer8; @@ -7438,12 +7435,12 @@ BYTE* WINAPI XTL::EmuIDirect3DVertexBuffer8_Lock2 { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DVertexBuffer8_Lock2\n" + DbgPrintf("EmuD3D8: EmuIDirect3DVertexBuffer8_Lock2\n" "(\n" " ppVertexBuffer : 0x%.08X\n" " Flags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), ppVertexBuffer, Flags); + ppVertexBuffer, Flags); IDirect3DVertexBuffer8 *pVertexBuffer8 = NULL; @@ -7484,7 +7481,7 @@ XTL::X_D3DVertexBuffer* WINAPI XTL::EmuIDirect3DDevice8_GetStreamSource2 " StreamNumber : 0x%.08X\n" " pStride : 0x%.08X\n" ");\n", - GetCurrentThreadId(), StreamNumber, pStride); + StreamNumber, pStride); EmuWarning("Not correctly implemented yet!"); X_D3DVertexBuffer* pVertexBuffer = new X_D3DVertexBuffer(); @@ -7506,13 +7503,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetStreamSource { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetStreamSource\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetStreamSource\n" "(\n" " StreamNumber : 0x%.08X\n" " pStreamData : 0x%.08X (0x%.08X)\n" " Stride : 0x%.08X\n" ");\n", - GetCurrentThreadId(), StreamNumber, pStreamData, (pStreamData != 0) ? pStreamData->EmuVertexBuffer8 : 0, Stride); + StreamNumber, pStreamData, (pStreamData != 0) ? pStreamData->EmuVertexBuffer8 : 0, Stride); // Cache stream number g_dwLastSetStream = StreamNumber; @@ -7566,11 +7563,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexShader { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexShader\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetVertexShader\n" "(\n" " Handle : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Handle); + Handle); HRESULT hRet = D3D_OK; @@ -7607,7 +7604,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexShader RealHandle &= ~D3DFVF_SPECULAR; RealHandle &= 0x00FF; if( RealHandle != 0 ) - printf( "EmuWarning: Handle = 0x%.08X\n", RealHandle ); + EmuWarning("EmuIDirect3DDevice8_SetVertexShader Handle = 0x%.08X", RealHandle ); RealHandle = Handle; } hRet = g_pD3DDevice8->SetVertexShader(RealHandle); @@ -7629,13 +7626,13 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_DrawVertices { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_DrawVertices\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_DrawVertices\n" "(\n" " PrimitiveType : 0x%.08X\n" " StartVertex : 0x%.08X\n" " VertexCount : 0x%.08X\n" ");\n", - GetCurrentThreadId(), PrimitiveType, StartVertex, VertexCount); + PrimitiveType, StartVertex, VertexCount); EmuUpdateDeferredStates(); EmuUnswizzleTextureStages(); @@ -7707,14 +7704,14 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_DrawVerticesUP { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_DrawVerticesUP\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_DrawVerticesUP\n" "(\n" " PrimitiveType : 0x%.08X\n" " VertexCount : 0x%.08X\n" " pVertexStreamZeroData : 0x%.08X\n" " VertexStreamZeroStride : 0x%.08X\n" ");\n", - GetCurrentThreadId(), PrimitiveType, VertexCount, pVertexStreamZeroData, + PrimitiveType, VertexCount, pVertexStreamZeroData, VertexStreamZeroStride); EmuUpdateDeferredStates(); @@ -7800,13 +7797,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_DrawIndexedVertices { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_DrawIndexedVertices\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_DrawIndexedVertices\n" "(\n" " PrimitiveType : 0x%.08X\n" " VertexCount : 0x%.08X\n" " pIndexData : 0x%.08X\n" ");\n", - GetCurrentThreadId(), PrimitiveType, VertexCount, pIndexData); + PrimitiveType, VertexCount, pIndexData); //#if 0 // update index buffer, if necessary if(g_pIndexBuffer != 0 && g_pIndexBuffer->Lock == X_D3DRESOURCE_LOCK_FLAG_NOSIZE) @@ -7999,7 +7996,7 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_DrawIndexedVerticesUP { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_DrawIndexedVerticesUP\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_DrawIndexedVerticesUP\n" "(\n" " PrimitiveType : 0x%.08X\n" " VertexCount : 0x%.08X\n" @@ -8007,7 +8004,7 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_DrawIndexedVerticesUP " pVertexStreamZeroData : 0x%.08X\n" " VertexStreamZeroStride : 0x%.08X\n" ");\n", - GetCurrentThreadId(), PrimitiveType, VertexCount, pIndexData, pVertexStreamZeroData, VertexStreamZeroStride); + PrimitiveType, VertexCount, pIndexData, pVertexStreamZeroData, VertexStreamZeroStride); // update index buffer, if necessary if(g_pIndexBuffer != 0 && g_pIndexBuffer->Lock == X_D3DRESOURCE_LOCK_FLAG_NOSIZE) @@ -8082,12 +8079,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetLight { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetLight\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetLight\n" "(\n" " Index : 0x%.08X\n" " pLight : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Index, pLight); + Index, pLight); HRESULT hRet = g_pD3DDevice8->SetLight(Index, pLight); @@ -8106,11 +8103,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetMaterial { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetMaterial\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetMaterial\n" "(\n" " pMaterial : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pMaterial); + pMaterial); HRESULT hRet = g_pD3DDevice8->SetMaterial(pMaterial); @@ -8130,12 +8127,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_LightEnable { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_LightEnable\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_LightEnable\n" "(\n" " Index : 0x%.08X\n" " bEnable : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Index, bEnable); + Index, bEnable); HRESULT hRet = g_pD3DDevice8->LightEnable(Index, bEnable); @@ -8155,12 +8152,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetRenderTarget { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderTarget\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderTarget\n" "(\n" " pRenderTarget : 0x%.08X (0x%.08X)\n" " pNewZStencil : 0x%.08X (0x%.08X)\n" ");\n", - GetCurrentThreadId(), pRenderTarget, (pRenderTarget != 0) ? pRenderTarget->EmuSurface8 : 0, pNewZStencil, + pRenderTarget, (pRenderTarget != 0) ? pRenderTarget->EmuSurface8 : 0, pNewZStencil, (pNewZStencil != 0) ? pNewZStencil->EmuSurface8 : 0); IDirect3DSurface8 *pPCRenderTarget = 0; @@ -8227,11 +8224,11 @@ XTL::X_D3DPalette * WINAPI XTL::EmuIDirect3DDevice8_CreatePalette2 { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreatePalette2\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_CreatePalette2\n" "(\n" " Size : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Size); + Size); X_D3DPalette *pPalette = new X_D3DPalette(); @@ -8272,12 +8269,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetPalette { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetPalette\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetPalette\n" "(\n" " Stage : 0x%.08X\n" " pPalette : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Stage, pPalette); + Stage, pPalette); // g_pD3DDevice8->SetPaletteEntries(0, (PALETTEENTRY*)pPalette->Data); @@ -8308,11 +8305,11 @@ void WINAPI XTL::EmuIDirect3DDevice8_SetFlickerFilter { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetFlickerFilter\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetFlickerFilter\n" "(\n" " Filter : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Filter); + Filter); EmuWarning("Not setting flicker filter"); @@ -8331,11 +8328,11 @@ void WINAPI XTL::EmuIDirect3DDevice8_SetSoftDisplayFilter { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetSoftDisplayFilter\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetSoftDisplayFilter\n" "(\n" " Enable : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Enable); + Enable); EmuWarning("Not setting soft display filter"); @@ -8378,12 +8375,12 @@ XTL::D3DCOLOR * WINAPI XTL::EmuIDirect3DPalette8_Lock2 { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DPalette8_Lock\n" + DbgPrintf("EmuD3D8: EmuIDirect3DPalette8_Lock\n" "(\n" " pThis : 0x%.08X (->Data : 0x%.08X)\n" " Flags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pThis->Data, Flags); + pThis, pThis->Data, Flags); // If X_D3DLOCK_READONLY and X_D3DLOCK_NOOVERWRITE bitflags not set if( !(Flags & (X_D3DLOCK_READONLY | X_D3DLOCK_NOOVERWRITE)) ) @@ -8409,12 +8406,12 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_GetVertexShaderSize { - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetVertexShaderSize\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_GetVertexShaderSize\n" "(\n" " Handle : 0x%.08X\n" " pSize : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Handle, pSize); + Handle, pSize); if(pSize && VshHandleIsVertexShader(Handle)) { @@ -8444,7 +8441,7 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_DeleteVertexShader "(\n" " Handle : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Handle); + Handle); DWORD RealHandle = 0; @@ -8484,12 +8481,12 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_SelectVertexShaderDirect // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_SelectVertexShaderDirect\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_SelectVertexShaderDirect\n" "(\n" " pVAF : 0x%.08X\n" " Address : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pVAF,Address); + pVAF,Address); DbgPrintf("NOT YET IMPLEMENTED!\n"); @@ -8505,11 +8502,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_GetShaderConstantMode ) { - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetShaderConstantMode\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_GetShaderConstantMode\n" "(\n" " pMode : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pMode); + pMode); if(pMode) { @@ -8528,11 +8525,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_GetVertexShader // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetVertexShader\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_GetVertexShader\n" "(\n" " pHandle : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pHandle); + pHandle); if(pHandle) { @@ -8555,13 +8552,13 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_GetVertexShaderConstant // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetVertexShaderConstant\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_GetVertexShaderConstant\n" "(\n" " Register : 0x%.08X\n" " pConstantData : 0x%.08X\n" " ConstantCount : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Register, pConstantData, ConstantCount); + Register, pConstantData, ConstantCount); HRESULT hRet = g_pD3DDevice8->GetVertexShaderConstant ( @@ -8586,13 +8583,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexShaderInputDirect // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_SelectVertexShaderDirect\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_SelectVertexShaderDirect\n" "(\n" " pVAF : 0x%.08X\n" " StreamCount : 0x%.08X\n" " pStreamInputs : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pVAF, StreamCount, pStreamInputs); + pVAF, StreamCount, pStreamInputs); DbgPrintf("NOT YET IMPLEMENTED!\n"); @@ -8614,13 +8611,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetVertexShaderInput // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetVertexShaderInput\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_GetVertexShaderInput\n" "(\n" " pHandle : 0x%.08X\n" " pStreamCount : 0x%.08X\n" " pStreamInputs : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pHandle, pStreamCount, pStreamInputs); + pHandle, pStreamCount, pStreamInputs); DbgPrintf("NOT YET IMPLEMENTED!\n"); @@ -8642,13 +8639,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetVertexShaderInput // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetVertexShaderInput\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_SetVertexShaderInput\n" "(\n" " Handle : 0x%.08X\n" " StreamCount : 0x%.08X\n" " pStreamInputs : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Handle, StreamCount, pStreamInputs); + Handle, StreamCount, pStreamInputs); DbgPrintf("NOT YET IMPLEMENTED!\n"); @@ -8670,12 +8667,12 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_RunVertexStateShader // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_RunVertexStateShader\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_RunVertexStateShader\n" "(\n" " Address : 0x%.08X\n" " pData : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Address,pData); + Address,pData); DbgPrintf("NOT YET IMPLEMENTED!\n"); @@ -8694,12 +8691,12 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_LoadVertexShaderProgram // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_LoadVertexShaderProgram\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_LoadVertexShaderProgram\n" "(\n" " pFunction : 0x%.08X\n" " Address : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pFunction,Address); + pFunction,Address); DbgPrintf("NOT YET IMPLEMENTED!\n"); @@ -8718,12 +8715,12 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_GetVertexShaderType // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetVertexShaderType\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_GetVertexShaderType\n" "(\n" " Handle : 0x%.08X\n" " pType : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Handle, pType); + Handle, pType); if(pType && VshHandleIsVertexShader(Handle)) { @@ -8746,13 +8743,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetVertexShaderDeclaration // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetVertexShaderDeclaration\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_GetVertexShaderDeclaration\n" "(\n" " Handle : 0x%.08X\n" " pData : 0x%.08X\n" " pSizeOfData : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Handle, pData, pSizeOfData); + Handle, pData, pSizeOfData); HRESULT hRet = D3DERR_INVALIDCALL; @@ -8789,13 +8786,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetVertexShaderFunction // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetVertexShaderFunction\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_GetVertexShaderFunction\n" "(\n" " Handle : 0x%.08X\n" " pData : 0x%.08X\n" " pSizeOfData : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Handle,pData,pSizeOfData); + Handle,pData,pSizeOfData); HRESULT hRet = D3DERR_INVALIDCALL; @@ -8832,13 +8829,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetDepthClipPlanes // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetDepthClipPlanes\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DDevice8_SetDepthClipPlanes\n" "(\n" " Near : 0x%.08X\n" " Far : 0x%.08X\n" " Flags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Near, Far, Flags); + Near, Far, Flags); HRESULT hRet = D3D_OK; @@ -8903,12 +8900,12 @@ PVOID WINAPI XTL::EmuIDirect3D8_AllocContiguousMemory // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3D8_AllocContiguousMemory\n" + DbgPrintf( "EmuD3D8: EmuIDirect3D8_AllocContiguousMemory\n" "(\n" " dwSize : 0x%.08X\n" " dwAllocAttributes : 0x%.08X\n" ");\n", - GetCurrentThreadId(), dwSize,dwAllocAttributes); + dwSize,dwAllocAttributes); // // NOTE: Kludgey (but necessary) solution: @@ -8930,7 +8927,7 @@ PVOID WINAPI XTL::EmuIDirect3D8_AllocContiguousMemory pRet = (PVOID)dwRet; } - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3D8_AllocContiguousMemory returned 0x%.08X\n", GetCurrentThreadId(), pRet); + DbgPrintf("EmuD3D8: EmuIDirect3D8_AllocContiguousMemory returned 0x%.08X\n", pRet); @@ -8949,12 +8946,12 @@ HRESULT WINAPI XTL::EmuIDirect3DTexture8_GetLevelDesc // debug trace - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3DTexture8_GetLevelDesc\n" + DbgPrintf( "EmuD3D8: EmuIDirect3DTexture8_GetLevelDesc\n" "(\n" " Level : 0x%.08X\n" " pDesc : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Level,pDesc); + Level,pDesc); @@ -8975,7 +8972,7 @@ HRESULT WINAPI XTL::EmuIDirect3D8_CheckDeviceMultiSampleType { - DbgPrintf( "EmuD3D8 (0x%X): EmuIDirect3D8_CheckDeviceMultiSampleType\n" + DbgPrintf( "EmuD3D8: EmuIDirect3D8_CheckDeviceMultiSampleType\n" "(\n" " Adapter : 0x%.08X\n" " DeviceType : 0x%.08X\n" @@ -8983,7 +8980,7 @@ HRESULT WINAPI XTL::EmuIDirect3D8_CheckDeviceMultiSampleType " Windowed : 0x%.08X\n" " MultiSampleType : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Adapter, DeviceType, SurfaceFormat, Windowed, MultiSampleType); + Adapter, DeviceType, SurfaceFormat, Windowed, MultiSampleType); if(Adapter != D3DADAPTER_DEFAULT) { @@ -9047,13 +9044,13 @@ HRESULT WINAPI XTL::EmuIDirect3D8_GetDeviceCaps { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3D8_GetDeviceCaps\n" + DbgPrintf("EmuD3D8: EmuIDirect3D8_GetDeviceCaps\n" "(\n" " Adapter : 0x%.08X\n" " DeviceType : 0x%.08X\n" " pCaps : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Adapter, DeviceType, pCaps); + Adapter, DeviceType, pCaps); HRESULT hRet = g_pD3D8->GetDeviceCaps(Adapter, DeviceType, pCaps); if(FAILED(hRet)) @@ -9075,12 +9072,12 @@ HRESULT WINAPI XTL::EmuIDirect3D8_SetPushBufferSize { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3D8_SetPushBufferSize\n" + DbgPrintf("EmuD3D8: EmuIDirect3D8_SetPushBufferSize\n" "(\n" " PushBufferSize : 0x%.08X\n" " KickOffSize : 0x%.08X\n" ");\n", - GetCurrentThreadId(), PushBufferSize, KickOffSize); + PushBufferSize, KickOffSize); HRESULT hRet = D3D_OK; @@ -9098,7 +9095,7 @@ DWORD WINAPI XTL::EmuIDirect3DDevice8_InsertFence() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_InsertFence()\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_InsertFence()\n"); // TODO: Actually implement this DWORD dwRet = 0x8000BEEF; @@ -9118,11 +9115,11 @@ BOOL WINAPI XTL::EmuIDirect3DDevice8_IsFencePending { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_IsFencePending\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_IsFencePending\n" "(\n" " Fence : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Fence); + Fence); // TODO: Implement @@ -9141,11 +9138,11 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_BlockOnFence { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_BlockOnFence\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_BlockOnFence\n" "(\n" " Fence : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Fence); + Fence); // TODO: Implement @@ -9162,11 +9159,11 @@ VOID WINAPI XTL::EmuIDirect3DResource8_BlockUntilNotBusy { // - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DResource8_BlockUntilNotBusy\n" + DbgPrintf("EmuD3D8: EmuIDirect3DResource8_BlockUntilNotBusy\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); // TODO: Implement @@ -9186,12 +9183,12 @@ VOID WINAPI XTL::EmuIDirect3DVertexBuffer8_GetDesc { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DVertexBuffer8_GetDesc\n" + DbgPrintf("EmuD3D8: EmuIDirect3DVertexBuffer8_GetDesc\n" "(\n" " pThis : 0x%.08X\n" " pDesc : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pDesc); + pThis, pDesc); // TODO: Implement @@ -9210,13 +9207,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetScissors { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetScissors\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetScissors\n" "(\n" " Count : 0x%.08X\n" " Exclusive : 0x%.08X\n" " pRects : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Count, Exclusive, pRects); + Count, Exclusive, pRects); // TODO: Implement @@ -9236,12 +9233,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetScreenSpaceOffset { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetScreenSpaceOffset\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetScreenSpaceOffset\n" "(\n" " x : %f\n" " y : %f\n" ");\n", - GetCurrentThreadId(), x, y); + x, y); EmuWarning("EmuIDirect3DDevice8_SetScreenSpaceOffset ignored"); @@ -9260,11 +9257,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetPixelShaderProgram { // Win2kXP FS - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetPixelShaderProgram\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetPixelShaderProgram\n" "(\n" " pPSDef : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pPSDef ); + pPSDef ); HRESULT hRet = E_FAIL; DWORD dwHandle; @@ -9305,12 +9302,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateStateBlock { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_CreateStateBlock\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_CreateStateBlock\n" "(\n" " Type : 0x%.08X\n" " pToken : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Type, pToken); + Type, pToken); // blueshogun96 10/1/07 // I'm assuming this is the same as the PC version... @@ -9318,7 +9315,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateStateBlock HRESULT hRet = g_pD3DDevice8->CreateStateBlock( Type, pToken ); if(FAILED(hRet)) - EmuWarning("CreateStateBlock failed!\n"); + EmuWarning("CreateStateBlock failed!"); @@ -9337,15 +9334,15 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_InsertCallback { - /*DbgP*/printf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_InsertCallback\n" + /*DbgP*/printf("EmuD3D8: EmuIDirect3DDevice8_InsertCallback\n" "(\n" " Type : 0x%.08X\n" " pCallback : 0x%.08X\n" " Context : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Type, pCallback, Context); + Type, pCallback, Context); - EmuWarning("InsertCallback ignored!\n"); + EmuWarning("InsertCallback ignored!"); // TODO: Implement g_pCallback = (D3DCALLBACK) pCallback; @@ -9367,18 +9364,18 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_DrawRectPatch { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_DrawRectPatch\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_DrawRectPatch\n" "(\n" " Handle : 0x%.08X\n" " pNumSegs : %f\n" " pRectPatchInfo : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Handle, *pNumSegs, pRectPatchInfo); + Handle, *pNumSegs, pRectPatchInfo); HRESULT hRet = g_pD3DDevice8->DrawRectPatch( Handle, pNumSegs, pRectPatchInfo ); if(FAILED(hRet)) - EmuWarning("DrawRectPatch failed!\n"); + EmuWarning("DrawRectPatch failed!"); @@ -9396,11 +9393,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetProjectionViewportMatrix { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetProjectionViewportMatrix\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetProjectionViewportMatrix\n" "(\n" " pProjectionViewport : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pProjectionViewport); + pProjectionViewport); // blueshogun96 1/25/10 // It's been almost 3 years, but I think this is a better @@ -9414,12 +9411,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetProjectionViewportMatrix // Get current viewport hRet = g_pD3DDevice8->GetViewport(&Viewport); if(FAILED(hRet)) - EmuWarning("Unable to get viewport!\n"); + EmuWarning("Unable to get viewport!"); // Get current projection matrix hRet = g_pD3DDevice8->GetTransform(D3DTS_PROJECTION, &mtxProjection); if(FAILED(hRet)) - EmuWarning("Unable to get projection matrix!\n"); + EmuWarning("Unable to get projection matrix!"); // Clear the destination matrix ::ZeroMemory(&Out, sizeof(D3DMATRIX)); @@ -9465,11 +9462,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_BackFillMode { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_BackFillMode\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_BackFillMode\n" "(\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Value); + Value); // blueshogun96 12/4/07 @@ -9495,7 +9492,7 @@ VOID WINAPI XTL::EmuD3DDevice_KickOff() - DbgPrintf("EmuD3D8 (0x%X): EmuD3DDevice_KickOff()\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuD3DDevice_KickOff()\n"); // TODO: Anything (kick off and NOT wait for idle)? // NOTE: We should actually emulate IDirect3DDevice8_KickPushBuffer() @@ -9515,11 +9512,11 @@ XTL::X_D3DResource* WINAPI XTL::EmuIDirect3DDevice8_GetTexture2(DWORD Stage) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetTexture2\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetTexture2\n" "(\n" " Stage : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Stage); + Stage); // Get the active texture from this stage X_D3DResource* pRet = EmuD3DActiveTexture[Stage]; @@ -9536,11 +9533,11 @@ VOID WINAPI XTL::EmuD3DDevice_SetStateVB( ULONG Unknown1 ) { - DbgPrintf("EmuD3D8 (0x%X): EmuD3DDevice_SetStateVB\n" + DbgPrintf("EmuD3D8: EmuD3DDevice_SetStateVB\n" "(\n" " Unknown1 : 0x%.08X\n" ")\n", - GetCurrentThreadId(), Unknown1); + Unknown1); // TODO: Anything? __asm int 3; @@ -9555,7 +9552,7 @@ VOID WINAPI XTL::EmuD3DDevice_SetStateUP() { - DbgPrintf("EmuD3D8 (0x%X): EmuD3DDevice_SetStateUP()\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuD3DDevice_SetStateUP()\n"); // TODO: Anything? __asm int 3; @@ -9570,11 +9567,11 @@ void WINAPI XTL::EmuIDirect3DDevice8_SetStipple( DWORD* pPattern ) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetStipple\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetStipple\n" "(\n" " pPattern : 0x%.08X\n" ")\n", - GetCurrentThreadId(), pPattern); + pPattern); // We need an OpenGL port... badly @@ -9591,11 +9588,11 @@ void WINAPI XTL::EmuIDirect3DDevice8_SetSwapCallback { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetSwapCallback\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetSwapCallback\n" "(\n" " pCallback : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pCallback); + pCallback); DbgPrintf("pCallback: = 0x%.08X\n", pCallback); @@ -9613,7 +9610,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_PersistDisplay() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_PersistDisplay()\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_PersistDisplay()\n"); HRESULT hRet = S_OK; @@ -9686,7 +9683,7 @@ void WINAPI XTL::EmuIDirect3DDevice8_Unknown1() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_Unknown1()\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_Unknown1()\n"); // TODO: Find out what this actually is. // This function was only found in Run Like Hell (5233) @ 0x11FCD0. @@ -9708,12 +9705,12 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_PrimeVertexCache { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_PrimeVertexCache\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_PrimeVertexCache\n" "(\n" " VertexCount : 0x%.08X\n" " pIndexData : 0x%.08X\n" ");\n", - GetCurrentThreadId(), VertexCount, pIndexData); + VertexCount, pIndexData); // TODO: Implement EmuWarning("PrimeVertexCache is not supported!"); @@ -9733,11 +9730,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetRenderState_SampleAlpha { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_SampleAlpha\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_SampleAlpha\n" "(\n" " dwSampleAlpha : 0x%.08X\n" ");\n", - GetCurrentThreadId(), dwSampleAlpha); + dwSampleAlpha); // TODO: Implement? @@ -9759,12 +9756,12 @@ VOID __fastcall XTL::EmuIDirect3DDevice8_SetRenderState_Deferred { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderState_Deferred\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderState_Deferred\n" "(\n" " State : 0x%.08X\n" " Value : 0x%.08X\n" ");\n", - GetCurrentThreadId(), State, Value); + State, Value); // TODO: HACK: Technically, this function doesn't need to be emulated. // The location of EmuD3DDeferredRenderState for 3911 isn't correct and at @@ -9829,11 +9826,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_DeleteStateBlock { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_DeleteStateBlock\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_DeleteStateBlock\n" "(\n" " Token : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Token); + Token); HRESULT hRet = g_pD3DDevice8->DeleteStateBlock(Token); @@ -9855,13 +9852,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetModelView { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetModelView\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetModelView\n" "(\n" " pModelView : 0x%.08X\n" " pInverseModelView : 0x%.08X\n" " pComposite : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pModelView, pInverseModelView, pComposite); + pModelView, pInverseModelView, pComposite); // TODO: Implement // CxbxKrnlCleanup("SetModelView not yet implemented (should be easy fix, tell blueshogun)"); @@ -9878,7 +9875,7 @@ void WINAPI XTL::EmuIDirect3DDevice8_FlushVertexCache() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_FlushVertexCache();\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_FlushVertexCache();\n"); } @@ -9893,10 +9890,10 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_BeginPushBuffer { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_BeginPushBuffer\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_BeginPushBuffer\n" "(\n" " pPushBuffer : 0x%.08X\n" - ");\n", GetCurrentThreadId(), pPushBuffer); + ");\n", pPushBuffer); // TODO: Implement. Easier said than done with Direct3D, but OpenGL // can emulate this functionality rather easily. @@ -9916,7 +9913,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_EndPushBuffer() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_EndPushBuffer();\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_EndPushBuffer();\n"); @@ -9930,10 +9927,10 @@ void WINAPI XTL::EmuXMETAL_StartPush(void* Unknown) { - DbgPrintf("EmuD3D8 (0x%X): EmuXMETAL_StartPush\n" + DbgPrintf("EmuD3D8: EmuXMETAL_StartPush\n" "(\n" " Unknown : 0x%.08X\n" - ");\n", GetCurrentThreadId(), Unknown); + ");\n", Unknown); // This function is too low level to actually emulate // Only use for debugging. @@ -9949,10 +9946,10 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetModelView(D3DXMATRIX* pModelView) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetModelView\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetModelView\n" "(\n" " pModelView : 0x%.08X\n" - ");\n", GetCurrentThreadId(), pModelView); + ");\n", pModelView); D3DXMATRIX mtxWorld, mtxView; @@ -9974,10 +9971,10 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetBackMaterial(D3DMATERIAL8* pMaterial) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetBackMaterial\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetBackMaterial\n" "(\n" " pMaterial : 0x%.08X\n" - ");\n", GetCurrentThreadId(), pMaterial); + ");\n", pMaterial); EmuWarning("SetBackMaterial is not supported!"); @@ -9998,12 +9995,12 @@ HRESULT WINAPI XTL::EmuIDirect3D8_GetAdapterIdentifier { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3D8_GetAdapterIdentifier\n" + DbgPrintf("EmuD3D8: EmuIDirect3D8_GetAdapterIdentifier\n" "(\n" " Adapter : 0x%.08X\n" " Flags : 0x%.08X\n" " pIdentifier : 0x%.08X (0x%.08X)\n" - ");\n", GetCurrentThreadId(), Adapter, Flags, pIdentifier, pIdentifier); + ");\n", Adapter, Flags, pIdentifier, pIdentifier); // TODO: Fill the Intentifier structure with the content of what an Xbox would return. // It might not matter for now, but just in case. @@ -10028,11 +10025,11 @@ HRESULT WINAPI XTL::EmuD3D_MakeRequestedSpace( DWORD Unknown1, DWORD Unknown2 ) { - DbgPrintf("EmuD3D8 (0x%X): EmuD3D_MakeRequestedSpace\n" + DbgPrintf("EmuD3D8: EmuD3D_MakeRequestedSpace\n" "(\n" " Unknown1 : 0x%.08X\n" " Unknown2 : 0x%.08X\n" - ");\n", GetCurrentThreadId(), Unknown1, Unknown2); + ");\n", Unknown1, Unknown2); // NOTE: This function is not meant to me emulated. Just use it to find out // the function that is calling it, and emulate that instead!!! If necessary, @@ -10053,7 +10050,7 @@ void WINAPI XTL::EmuD3DDevice_MakeSpace() { - DbgPrintf( "EmuD3D8 (0x%X): EmuD3DDevice_MakeSpace();\n", GetCurrentThreadId()); + DbgPrintf( "EmuD3D8: EmuD3DDevice_MakeSpace();\n"); // NOTE: Like the above function, this should not be emulated. The intended // usage is the same as above. @@ -10071,7 +10068,7 @@ void WINAPI XTL::EmuD3D_SetCommonDebugRegisters() { - DbgPrintf( "EmuD3D8 (0x%X): EmuD3D_SetCommonDebugRegisters();\n", GetCurrentThreadId()); + DbgPrintf( "EmuD3D8: EmuD3D_SetCommonDebugRegisters();\n"); // NOTE: I added this because I was too lazy to deal with emulating certain render // states that use it. @@ -10086,11 +10083,11 @@ void WINAPI XTL::EmuD3D_BlockOnTime( DWORD Unknown1, int Unknown2 ) { - DbgPrintf("EmuD3D8 (0x%X): EmuD3D_BlockOnTime\n" + DbgPrintf("EmuD3D8: EmuD3D_BlockOnTime\n" "(\n" " Unknown1 : 0x%.08X\n" " Unknown2 : 0x%.08X\n" - ");\n", GetCurrentThreadId(), Unknown1, Unknown2); + ");\n", Unknown1, Unknown2); // NOTE: This function is not meant to me emulated. Just use it to find out // the function that is calling it, and emulate that instead!!! If necessary, @@ -10109,10 +10106,10 @@ void WINAPI XTL::EmuD3D_BlockOnResource( X_D3DResource* pResource ) { - DbgPrintf("EmuD3D8 (0x%X): EmuD3D_BlockOnResource\n" + DbgPrintf("EmuD3D8: EmuD3D_BlockOnResource\n" "(\n" " pResource : 0x%.08X\n" - ");\n", GetCurrentThreadId(), pResource); + ");\n", pResource); // TODO: Implement // NOTE: Azurik appears to call this directly from numerous points @@ -10130,10 +10127,10 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetPushBufferOffset { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetPushBufferOffset\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetPushBufferOffset\n" "(\n" " pOffset : 0x%.08X\n" - ");\n", GetCurrentThreadId(), pOffset); + ");\n", pOffset); // TODO: Implement *pOffset = 0; @@ -10156,13 +10153,13 @@ HRESULT WINAPI XTL::EmuIDirect3DCubeTexture8_GetCubeMapSurface { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DCubeTexture8_GetCubeMapSurface\n" + DbgPrintf("EmuD3D8: EmuIDirect3DCubeTexture8_GetCubeMapSurface\n" "(\n" " pThis : 0x%.08X\n" " FaceType : 0x%.08X\n" " Level : 0x%.08X\n" " ppCubeMapSurface : 0x%.08X (0x%.08X)\n" - ");\n", GetCurrentThreadId(), pThis, FaceType, Level, ppCubeMapSurface, *ppCubeMapSurface); + ");\n", pThis, FaceType, Level, ppCubeMapSurface, *ppCubeMapSurface); HRESULT hRet; @@ -10188,12 +10185,12 @@ XTL::X_D3DSurface* WINAPI XTL::EmuIDirect3DCubeTexture8_GetCubeMapSurface2 { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DCubeTexture8_GetCubeMapSurface2\n" + DbgPrintf("EmuD3D8: EmuIDirect3DCubeTexture8_GetCubeMapSurface2\n" "(\n" " pThis : 0x%.08X\n" " FaceType : 0x%.08X\n" " Level : 0x%.08X\n" - ");\n", GetCurrentThreadId(), pThis, FaceType, Level); + ");\n", pThis, FaceType, Level); HRESULT hRet; @@ -10218,11 +10215,11 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetPixelShader { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetPixelShader\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetPixelShader\n" "(\n" " Name : 0x%.08X\n" " pHandle : 0x%.08X\n" - ");\n", GetCurrentThreadId(), Name, pHandle); + ");\n", Name, pHandle); // TODO: This implementation is very wrong, but better than nothing. *pHandle = g_dwCurrentPixelShader; @@ -10239,10 +10236,10 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetPersistedSurface(X_D3DSurface **ppSur { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetPersistedSurface\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetPersistedSurface\n" "(\n" " ppSurface : 0x%.08X\n" - ");\n", GetCurrentThreadId(), ppSurface); + ");\n", ppSurface); // Attempt to load the persisted surface from persisted_surface.bmp @@ -10259,7 +10256,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetPersistedSurface(X_D3DSurface **ppSur } else { - EmuWarning( "Could not load persisted_surface.bmp!\n" ); + EmuWarning( "Could not load persisted_surface.bmp!" ); } } else @@ -10279,7 +10276,7 @@ XTL::X_D3DSurface* WINAPI XTL::EmuIDirect3DDevice8_GetPersistedSurface2() { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetPersistedSurface()\n", GetCurrentThreadId()); + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetPersistedSurface()\n"); // Attempt to load the persisted surface from persisted_surface.bmp @@ -10296,7 +10293,7 @@ XTL::X_D3DSurface* WINAPI XTL::EmuIDirect3DDevice8_GetPersistedSurface2() } else { - EmuWarning( "Could not load persisted_surface.bmp!\n" ); + EmuWarning( "Could not load persisted_surface.bmp!" ); } } else @@ -10321,13 +10318,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetRenderTargetFast { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_SetRenderTarget\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_SetRenderTarget\n" "(\n" " pRenderTarget : 0x%.08X (0x%.08X)\n" " pNewZStencil : 0x%.08X (0x%.08X)\n" " Flags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pRenderTarget, (pRenderTarget != 0) ? pRenderTarget->EmuSurface8 : 0, pNewZStencil, + pRenderTarget, (pRenderTarget != 0) ? pRenderTarget->EmuSurface8 : 0, pNewZStencil, (pNewZStencil != 0) ? pNewZStencil->EmuSurface8 : 0, Flags); // Redirect to the standard version. @@ -10352,13 +10349,13 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetScissors { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetScissors\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetScissors\n" "(\n" " pCount : 0x%.08X\n" " pExclusive : 0x%.08X\n" " pRects : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pCount, pExclusive, pRects); + pCount, pExclusive, pRects); // TODO: Save a copy of each scissor rect in case this function is called // in conjunction with D3DDevice::SetScissors. So far, only Outrun2 uses @@ -10387,10 +10384,10 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetBackMaterial(D3DMATERIAL8* pMaterial) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetBackMaterial\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetBackMaterial\n" "(\n" " pMaterial : 0x%.08X\n" - ");\n", GetCurrentThreadId(), pMaterial); + ");\n", pMaterial); EmuWarning("GetBackMaterial is not supported!"); @@ -10411,11 +10408,11 @@ void WINAPI XTL::EmuD3D_LazySetPointParams( void* Device ) { - DbgPrintf("EmuD3D8 (0x%X): EmuD3D_LazySetPointParams\n" + DbgPrintf("EmuD3D8: EmuD3D_LazySetPointParams\n" "(\n" " Device : 0x%.08X\n" ");\n", - GetCurrentThreadId(), Device); + Device); // Don't emulate this! Just look at the stack trace and go from there! __asm int 3; @@ -10430,10 +10427,10 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetMaterial(D3DMATERIAL8* pMaterial) { - DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_GetMaterial\n" + DbgPrintf("EmuD3D8: EmuIDirect3DDevice8_GetMaterial\n" "(\n" " pMaterial : 0x%.08X\n" - ");\n", GetCurrentThreadId(), pMaterial); + ");\n", pMaterial); if( pMaterial ) g_pD3DDevice8->GetMaterial( pMaterial ); diff --git a/src/CxbxKrnl/EmuD3D8/PixelShader.cpp b/src/CxbxKrnl/EmuD3D8/PixelShader.cpp index 6cad6f92e..03fa537bc 100644 --- a/src/CxbxKrnl/EmuD3D8/PixelShader.cpp +++ b/src/CxbxKrnl/EmuD3D8/PixelShader.cpp @@ -804,7 +804,7 @@ HRESULT XTL::CreatePixelShaderFunction(X_D3DPIXELSHADERDEF *pPSD, LPD3DXBUFFER* if (FAILED(hRet)) { - EmuWarning("Couldn't assemble recompiled pixel shader\n"); + EmuWarning("Couldn't assemble recompiled pixel shader"); if (pCompilationErrors) { EmuWarning((const char*)pCompilationErrors->GetBufferPointer()); @@ -813,7 +813,7 @@ HRESULT XTL::CreatePixelShaderFunction(X_D3DPIXELSHADERDEF *pPSD, LPD3DXBUFFER* } __except(EXCEPTION_EXECUTE_HANDLER) { - DbgPrintf("Pixel Shader : Exception while creating pixel shader 0x%.8X", pPSD); + DbgPrintf("Pixel Shader : Exception while creating pixel shader 0x%.8X\n", pPSD); } if (pCompilationErrors) { @@ -1426,7 +1426,7 @@ inline void HandleInputOutput if (bEFProduct) { - EmuWarning("EF Product and V1R0 register used at the same time!\n"); + EmuWarning("EF Product and V1R0 register used at the same time!"); } else { @@ -1947,7 +1947,7 @@ inline BOOL OptimizeOperation { if (szMod[0]) { - EmuWarning("Pixel Shader: Destination modifier present!\n"); + EmuWarning("Pixel Shader: Destination modifier present!"); } switch (eOpTypes[2]) { @@ -2072,7 +2072,7 @@ inline BOOL OptimizeOperation { if (szOutputs[2][0] != 'r') { - EmuWarning("Pixel Shader: Destination not temporary register!\n"); + EmuWarning("Pixel Shader: Destination not temporary register!"); } // ab input iOffset += sprintf(szCommand + iOffset, "mul%s r1, %s, %s\n", @@ -2404,7 +2404,7 @@ inline BOOL OptimizeOperation } if (!bHandled) { - EmuWarning("Unhandled pixel shader instruction!\n"); + EmuWarning("Unhandled pixel shader instruction!"); } // if (strcmp(szOps[2], "add") == 0) // { @@ -2418,7 +2418,7 @@ inline BOOL OptimizeOperation // } // else // { -// EmuWarning("Unhandled pixel shader instruction!\n"); +// EmuWarning("Unhandled pixel shader instruction!"); // } // } // else if (strcmp(szOps[2], "cnd") == 0) @@ -2433,12 +2433,12 @@ inline BOOL OptimizeOperation // } // else // { -// EmuWarning("Unhandled pixel shader instruction!\n"); +// EmuWarning("Unhandled pixel shader instruction!"); // } // } // else // { -// EmuWarning("Unhandled pixel shader instruction!\n"); +// EmuWarning("Unhandled pixel shader instruction!"); // } } } diff --git a/src/CxbxKrnl/EmuD3D8/VertexShader.cpp b/src/CxbxKrnl/EmuD3D8/VertexShader.cpp index 95b010852..c7e692308 100644 --- a/src/CxbxKrnl/EmuD3D8/VertexShader.cpp +++ b/src/CxbxKrnl/EmuD3D8/VertexShader.cpp @@ -534,7 +534,7 @@ static void VshParseInstruction(uint32 *pShaderToken, pInstruction->A.Address = ConvertCRegister(VshGetField(pShaderToken, FLD_CONST)); break; default: - EmuWarning("Invalid instruction, parameter A type unknown %d\n", pInstruction->A.ParameterType); + EmuWarning("Invalid instruction, parameter A type unknown %d", pInstruction->A.ParameterType); return; } pInstruction->A.Neg = VshGetField(pShaderToken, FLD_A_NEG); @@ -1300,7 +1300,7 @@ static boolean VshConvertShader(VSH_XBOX_SHADER *pShader, if(pIntermediate->Output.Type != IMD_OUTPUT_R) { // TODO: Complete dph support - EmuWarning("Can't simulate dph for other than output r registers (yet)\n"); + EmuWarning("Can't simulate dph for other than output r registers (yet)"); // attempt to find unused register... int outRegister = -1; @@ -1573,7 +1573,7 @@ static void VshConvertToken_NOP(DWORD *pToken) // D3DVSD_NOP if(*pToken != DEF_VSH_NOP) { - EmuWarning("Token NOP found, but extra parameters are given!\n"); + EmuWarning("Token NOP found, but extra parameters are given!"); } DbgVshPrintf("\tD3DVSD_NOP(),\n"); } @@ -1882,7 +1882,7 @@ static void VshConvertToken_STREAMDATA_REG(DWORD *pToken, if(NewDataType == 0xFF) { - EmuWarning("/* WARNING: Fatal type mismatch, no fitting type! */\n"); + EmuWarning("/* WARNING: Fatal type mismatch, no fitting type! */"); } } @@ -2046,7 +2046,7 @@ extern HRESULT XTL::EmuRecompileVshFunction hRet = E_FAIL; break; default: - EmuWarning("Unknown vertex shader version 0x%02X\n", pShaderHeader->Version); + EmuWarning("Unknown vertex shader version 0x%02X", pShaderHeader->Version); hRet = E_FAIL; break; } @@ -2104,8 +2104,8 @@ extern HRESULT XTL::EmuRecompileVshFunction if (FAILED(hRet)) { - EmuWarning("Couldn't assemble recompiled vertex shader\n"); - EmuWarning("%s\n", pErrors->GetBufferPointer()); + EmuWarning("Couldn't assemble recompiled vertex shader"); + EmuWarning("%s", pErrors->GetBufferPointer()); } if( pErrors ) diff --git a/src/CxbxKrnl/EmuDSound.cpp b/src/CxbxKrnl/EmuDSound.cpp index eb1c4bd78..5f8e73a82 100644 --- a/src/CxbxKrnl/EmuDSound.cpp +++ b/src/CxbxKrnl/EmuDSound.cpp @@ -258,13 +258,13 @@ HRESULT WINAPI XTL::EmuDirectSoundCreate { - DbgPrintf("EmuDSound (0x%X): EmuDirectSoundCreate\n" + DbgPrintf("EmuDSound: EmuDirectSoundCreate\n" "(\n" " pguidDeviceId : 0x%.08X\n" " ppDirectSound : 0x%.08X\n" " pUnknown : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pguidDeviceId, ppDirectSound, pUnknown); + pguidDeviceId, ppDirectSound, pUnknown); static bool initialized = false; @@ -321,11 +321,11 @@ ULONG WINAPI XTL::EmuIDirectSound8_AddRef { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_AddRef\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_AddRef\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); ULONG uRet = g_pDSound8RefCount++; @@ -344,11 +344,11 @@ ULONG WINAPI XTL::EmuIDirectSound8_Release { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_Release\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_Release\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); ULONG uRet = g_pDSound8RefCount--; @@ -373,12 +373,12 @@ HRESULT WINAPI XTL::EmuCDirectSound_GetSpeakerConfig { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSound_GetSpeakerConfig\n" + DbgPrintf("EmuDSound: EmuCDirectSound_GetSpeakerConfig\n" "(\n" " pThis : 0x%.08X\n" " pdwSpeakerConfig : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pdwSpeakerConfig); + pThis, pdwSpeakerConfig); *pdwSpeakerConfig = 0; // STEREO @@ -398,12 +398,12 @@ HRESULT WINAPI XTL::EmuIDirectSound8_EnableHeadphones { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_EnableHeadphones\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_EnableHeadphones\n" "(\n" " pThis : 0x%.08X\n" " fEnabled : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, fEnabled); + pThis, fEnabled); EmuWarning("EmuIDirectSound8_EnableHeadphones ignored"); @@ -422,11 +422,11 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SynchPlayback { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_SynchPlayback\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_SynchPlayback\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); EmuWarning("EmuIDirectSound8_SynchPlayback ignored"); @@ -449,7 +449,7 @@ HRESULT WINAPI XTL::EmuIDirectSound8_DownloadEffectsImage { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_DownloadEffectsImage\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_DownloadEffectsImage\n" "(\n" " pThis : 0x%.08X\n" " pvImageBuffer : 0x%.08X\n" @@ -457,7 +457,7 @@ HRESULT WINAPI XTL::EmuIDirectSound8_DownloadEffectsImage " pImageLoc : 0x%.08X\n" " ppImageDesc : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pvImageBuffer, dwImageSize, pImageLoc, ppImageDesc); + pThis, pvImageBuffer, dwImageSize, pImageLoc, ppImageDesc); // TODO: Actually implement this @@ -473,7 +473,7 @@ VOID WINAPI XTL::EmuDirectSoundDoWork() { - DbgPrintf("EmuDSound (0x%X): EmuDirectSoundDoWork();\n", GetCurrentThreadId()); + DbgPrintf("EmuDSound: EmuDirectSoundDoWork();\n"); HackUpdateSoundBuffers(); HackUpdateSoundStreams(); @@ -500,7 +500,7 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetOrientation { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_SetOrientation\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_SetOrientation\n" "(\n" " pThis : 0x%.08X\n" " xFront : %f\n" @@ -511,7 +511,7 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetOrientation " zTop : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, xFront, yFront, zFront, xTop, yTop, zTop, dwApply); + pThis, xFront, yFront, zFront, xTop, yTop, zTop, dwApply); // TODO: Actually implement this @@ -532,13 +532,13 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetDistanceFactor { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_SetDistanceFactor\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_SetDistanceFactor\n" "(\n" " pThis : 0x%.08X\n" " fDistanceFactor : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, fDistanceFactor, dwApply); + pThis, fDistanceFactor, dwApply); // TODO: Actually implement this @@ -559,13 +559,13 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetRolloffFactor { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_SetRolloffFactor\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_SetRolloffFactor\n" "(\n" " pThis : 0x%.08X\n" " fRolloffFactor : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, fRolloffFactor, dwApply); + pThis, fRolloffFactor, dwApply); // TODO: Actually implement this @@ -586,13 +586,13 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetDopplerFactor { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_SetDopplerFactor\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_SetDopplerFactor\n" "(\n" " pThis : 0x%.08X\n" " fDopplerFactor : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, fDopplerFactor, dwApply); + pThis, fDopplerFactor, dwApply); // TODO: Actually implement this @@ -611,13 +611,13 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetI3DL2Listener DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_SetI3DL2Listener\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_SetI3DL2Listener\n" "(\n" " pThis : 0x%.08X\n" " pDummy : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pDummy, dwApply); + pThis, pDummy, dwApply); // TODO: Actually do something @@ -634,13 +634,13 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetMixBinHeadroom DWORD dwHeadroom ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_SetMixBinHeadroom\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_SetMixBinHeadroom\n" "(\n" " pThis : 0x%.08X\n" " dwMixBinMask : 0x%.08X\n" " dwHeadroom : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwMixBinMask, dwHeadroom); + pThis, dwMixBinMask, dwHeadroom); // TODO: Actually do something @@ -656,12 +656,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetMixBins PVOID pMixBins ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetMixBins\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetMixBins\n" "(\n" " pThis : 0x%.08X\n" " pMixBins : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pMixBins); + pThis, pMixBins); // TODO: Actually do something @@ -677,12 +677,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetMixBinVolumes PVOID pMixBins ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetMixBinVolumes\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetMixBinVolumes\n" "(\n" " pThis : 0x%.08X\n" " pMixBins : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pMixBins); + pThis, pMixBins); // TODO: Actually do something @@ -701,7 +701,7 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetPosition DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_SetPosition\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_SetPosition\n" "(\n" " pThis : 0x%.08X\n" " x : %f\n" @@ -709,7 +709,7 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetPosition " z : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, x, y, z, dwApply); + pThis, x, y, z, dwApply); // TODO: Actually do something @@ -728,7 +728,7 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetVelocity DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_SetVelocity\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_SetVelocity\n" "(\n" " pThis : 0x%.08X\n" " x : %f\n" @@ -736,7 +736,7 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetVelocity " z : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, x, y, z, dwApply); + pThis, x, y, z, dwApply); // TODO: Actually do something @@ -753,13 +753,13 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetAllParameters DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_SetAllParameters\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_SetAllParameters\n" "(\n" " pThis : 0x%.08X\n" " pTodo : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pTodo, dwApply); + pThis, pTodo, dwApply); // TODO: Actually do something @@ -774,11 +774,11 @@ HRESULT WINAPI XTL::EmuCDirectSound_CommitDeferredSettings X_CDirectSound *pThis ) { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSound_CommitDeferredSettings\n" + DbgPrintf("EmuDSound: EmuCDirectSound_CommitDeferredSettings\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); // TODO: Translate params, then make the PC DirectSound call @@ -794,12 +794,12 @@ HRESULT WINAPI XTL::EmuDirectSoundCreateBuffer X_CDirectSoundBuffer **ppBuffer ) { - DbgPrintf("EmuDSound (0x%X): EmuDirectSoundCreateBuffer\n" + DbgPrintf("EmuDSound: EmuDirectSoundCreateBuffer\n" "(\n" " pdsbd : 0x%.08X\n" " ppBuffer : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pdsbd, ppBuffer); + pdsbd, ppBuffer); DWORD dwEmuFlags = 0; @@ -926,7 +926,7 @@ HRESULT WINAPI XTL::EmuDirectSoundCreateBuffer (*ppBuffer)->EmuLockBytes2 = 0; (*ppBuffer)->EmuFlags = dwEmuFlags; - DbgPrintf("EmuDSound (0x%X): EmuDirectSoundCreateBuffer, *ppBuffer := 0x%.08X, bytes := 0x%.08X\n", GetCurrentThreadId(), *ppBuffer, pDSBufferDesc->dwBufferBytes); + DbgPrintf("EmuDSound: EmuDirectSoundCreateBuffer, *ppBuffer := 0x%.08X, bytes := 0x%.08X\n", *ppBuffer, pDSBufferDesc->dwBufferBytes); HRESULT hRet = g_pDSound8->CreateSoundBuffer(bIsSpecial ? pDSBufferDescSpecial : pDSBufferDesc, &((*ppBuffer)->EmuDirectSoundBuffer8), NULL); @@ -968,14 +968,14 @@ HRESULT WINAPI XTL::EmuIDirectSound8_CreateBuffer PVOID pUnknown ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_CreateBuffer\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_CreateBuffer\n" "(\n" " pThis : 0x%.08X\n" " pdssd : 0x%.08X\n" " ppBuffer : 0x%.08X\n" " pUnknown : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pdssd, ppBuffer, pUnknown); + pThis, pdssd, ppBuffer, pUnknown); EmuDirectSoundCreateBuffer(pdssd, ppBuffer); @@ -993,13 +993,13 @@ HRESULT WINAPI XTL::EmuIDirectSound8_CreateSoundBuffer LPUNKNOWN pUnkOuter ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_CreateSoundBuffer\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_CreateSoundBuffer\n" "(\n" " pdsbd : 0x%.08X\n" " ppBuffer : 0x%.08X\n" " pUnkOuter : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pdsbd, ppBuffer, pUnkOuter); + pdsbd, ppBuffer, pUnkOuter); return EmuDirectSoundCreateBuffer(pdsbd, ppBuffer); } @@ -1016,13 +1016,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetBufferData { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetBufferData\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetBufferData\n" "(\n" " pThis : 0x%.08X\n" " pvBufferData : 0x%.08X\n" " dwBufferBytes : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pvBufferData, dwBufferBytes); + pThis, pvBufferData, dwBufferBytes); // update buffer data cache pThis->EmuBuffer = pvBufferData; @@ -1046,13 +1046,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetPlayRegion { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetPlayRegion\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetPlayRegion\n" "(\n" " pThis : 0x%.08X\n" " dwPlayStart : 0x%.08X\n" " dwPlayLength : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwPlayStart, dwPlayLength); + pThis, dwPlayStart, dwPlayLength); // TODO: Translate params, then make the PC DirectSound call @@ -1081,7 +1081,7 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_Lock { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_Lock\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_Lock\n" "(\n" " pThis : 0x%.08X\n" " dwOffset : 0x%.08X\n" @@ -1092,7 +1092,7 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_Lock " pdwAudioBytes2 : 0x%.08X\n" " dwFlags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwOffset, dwBytes, ppvAudioPtr1, pdwAudioBytes1, + pThis, dwOffset, dwBytes, ppvAudioPtr1, pdwAudioBytes1, ppvAudioPtr2, pdwAudioBytes2, dwFlags); HRESULT hRet = D3D_OK; @@ -1138,12 +1138,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetHeadroom { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetHeadroom\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetHeadroom\n" "(\n" " pThis : 0x%.08X\n" " dwHeadroom : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwHeadroom); + pThis, dwHeadroom); // TODO: Actually implement this @@ -1164,13 +1164,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetLoopRegion { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetLoopRegion\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetLoopRegion\n" "(\n" " pThis : 0x%.08X\n" " dwLoopStart : 0x%.08X\n" " dwLoopLength : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwLoopStart, dwLoopLength); + pThis, dwLoopStart, dwLoopLength); // TODO: Ensure that 4627 & 4361 are intercepting far enough back // (otherwise pThis is manipulated!) @@ -1192,11 +1192,11 @@ ULONG WINAPI XTL::EmuIDirectSoundBuffer8_Release { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_Release\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_Release\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); ULONG uRet = 0; @@ -1241,12 +1241,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetPitch { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetPitch\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetPitch\n" "(\n" " pThis : 0x%.08X\n" " lPitch : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, lPitch); + pThis, lPitch); // TODO: Translate params, then make the PC DirectSound call @@ -1266,12 +1266,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_GetStatus { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_GetStatus\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_GetStatus\n" "(\n" " pThis : 0x%.08X\n" " pdwStatus : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pdwStatus); + pThis, pdwStatus); HRESULT hRet = DS_OK; @@ -1300,12 +1300,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetCurrentPosition { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetCurrentPosition\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetCurrentPosition\n" "(\n" " pThis : 0x%.08X\n" " dwNewPosition : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwNewPosition); + pThis, dwNewPosition); // NOTE: TODO: This call *will* (by MSDN) fail on primary buffers! HRESULT hRet = pThis->EmuDirectSoundBuffer8->SetCurrentPosition(dwNewPosition); @@ -1330,13 +1330,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_GetCurrentPosition { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_GetCurrentPosition\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_GetCurrentPosition\n" "(\n" " pThis : 0x%.08X\n" " pdwCurrentPlayCursor : 0x%.08X\n" " pdwCurrentWriteCursor : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pdwCurrentPlayCursor, pdwCurrentWriteCursor); + pThis, pdwCurrentPlayCursor, pdwCurrentWriteCursor); HRESULT hRet = E_FAIL; @@ -1375,14 +1375,14 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_Play { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_Play\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_Play\n" "(\n" " pThis : 0x%.08X\n" " dwReserved1 : 0x%.08X\n" " dwReserved2 : 0x%.08X\n" " dwFlags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwReserved1, dwReserved2, dwFlags); + pThis, dwReserved1, dwReserved2, dwFlags); if(dwFlags & ~(X_DSBPLAY_LOOPING | X_DSBPLAY_FROMSTART | X_DSBPLAY_SYNCHPLAYBACK)) CxbxKrnlCleanup("Unsupported Playing Flags"); @@ -1440,11 +1440,11 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_Stop { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_Stop\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_Stop\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); HRESULT hRet = D3D_OK; @@ -1467,13 +1467,13 @@ extern "C" HRESULT __stdcall XTL::EmuIDirectSoundBuffer8_StopEx { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_StopEx\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_StopEx\n" "(\n" " pBuffer : 0x%.08X\n" " rtTimeStamp : 0x%.08X\n" " dwFlags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pBuffer, rtTimeStamp, dwFlags); + pBuffer, rtTimeStamp, dwFlags); if(pBuffer->EmuDirectSoundBuffer8 == 0) EmuWarning("pBuffer->EmuDirectSoundBuffer8 == 0"); @@ -1496,12 +1496,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetVolume { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetVolume\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetVolume\n" "(\n" " pThis : 0x%.08X\n" " lVolume : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, lVolume); + pThis, lVolume); // TODO: Ensure that 4627 & 4361 are intercepting far enough back // (otherwise pThis is manipulated!) @@ -1525,12 +1525,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetFrequency { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetFrequency\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetFrequency\n" "(\n" " pThis : 0x%.08X\n" " dwFrequency : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwFrequency); + pThis, dwFrequency); // HRESULT hRet = pThis->EmuDirectSoundBuffer8->SetFrequency(dwFrequency); @@ -1551,12 +1551,12 @@ HRESULT WINAPI XTL::EmuDirectSoundCreateStream { - DbgPrintf("EmuDSound (0x%X): EmuDirectSoundCreateStream\n" + DbgPrintf("EmuDSound: EmuDirectSoundCreateStream\n" "(\n" " pdssd : 0x%.08X (pdssd->dwFlags : 0x%.08X)\n" " ppStream : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pdssd, pdssd->dwFlags, ppStream); + pdssd, pdssd->dwFlags, ppStream); // TODO: Garbage Collection *ppStream = new X_CDirectSoundStream(); @@ -1617,7 +1617,7 @@ HRESULT WINAPI XTL::EmuDirectSoundCreateStream (*ppStream)->EmuLockPtr2 = 0; (*ppStream)->EmuLockBytes2 = 0; - DbgPrintf("EmuDSound (0x%X): EmuDirectSoundCreateStream, *ppStream := 0x%.08X\n", GetCurrentThreadId(), *ppStream); + DbgPrintf("EmuDSound: EmuDirectSoundCreateStream, *ppStream := 0x%.08X\n", *ppStream); if(!g_pDSound8) { @@ -1691,14 +1691,14 @@ HRESULT WINAPI XTL::EmuIDirectSound8_CreateStream PVOID pUnknown ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_CreateStream\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_CreateStream\n" "(\n" " pThis : 0x%.08X\n" " pdssd : 0x%.08X\n" " ppStream : 0x%.08X\n" " pUnknown : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pdssd, ppStream, pUnknown); + pThis, pdssd, ppStream, pUnknown); EmuDirectSoundCreateStream(pdssd, ppStream); @@ -1723,12 +1723,12 @@ ULONG WINAPI XTL::EmuCDirectSoundStream_SetVolume(X_CDirectSoundStream *pThis, L { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetVolume\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetVolume\n" "(\n" " pThis : 0x%.08X\n" " lVolume : %d\n" ");\n", - GetCurrentThreadId(), pThis, lVolume); + pThis, lVolume); // TODO: Actually SetVolume @@ -1749,13 +1749,13 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetRolloffFactor { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetRolloffFactor\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetRolloffFactor\n" "(\n" " pThis : 0x%.08X\n" " fRolloffFactor : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, fRolloffFactor, dwApply); + pThis, fRolloffFactor, dwApply); // TODO: Actually SetRolloffFactor @@ -1771,11 +1771,11 @@ ULONG WINAPI XTL::EmuCDirectSoundStream_AddRef(X_CDirectSoundStream *pThis) { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_AddRef\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_AddRef\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); if(pThis != 0) if(pThis->EmuDirectSoundBuffer8 != 0) // HACK: Ignore unsupported codecs. @@ -1793,11 +1793,11 @@ ULONG WINAPI XTL::EmuCDirectSoundStream_Release(X_CDirectSoundStream *pThis) { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_Release\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_Release\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); ULONG uRet = 0; @@ -1839,12 +1839,12 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_GetInfo { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_GetInfo\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_GetInfo\n" "(\n" " pThis : 0x%.08X\n" " pInfo : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pInfo); + pThis, pInfo); // TODO: A (real) implementation? EmuWarning("EmuCDirectSoundStream_GetInfo is not yet supported!"); @@ -1873,12 +1873,12 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_GetStatus { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_GetStatus\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_GetStatus\n" "(\n" " pThis : 0x%.08X\n" " pdwStatus : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pdwStatus); + pThis, pdwStatus); EmuWarning("EmuCDirectSoundStream_GetStatus is not yet implemented"); @@ -1901,13 +1901,13 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_Process { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_Process\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_Process\n" "(\n" " pThis : 0x%.08X\n" " pInputBuffer : 0x%.08X\n" " pOutputBuffer : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pInputBuffer, pOutputBuffer); + pThis, pInputBuffer, pOutputBuffer); if(pThis->EmuDirectSoundBuffer8 != NULL) { @@ -1939,11 +1939,11 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_Discontinuity(X_CDirectSoundStream *pT { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_Discontinuity\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_Discontinuity\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); // TODO: Actually Process @@ -1959,11 +1959,11 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_Flush(X_CDirectSoundStream *pThis) { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_Flush\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_Flush\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); // TODO: Actually Flush @@ -1979,11 +1979,11 @@ HRESULT WINAPI XTL::EmuCDirectSound_SynchPlayback(PVOID pUnknown) { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSound_SynchPlayback\n" + DbgPrintf("EmuDSound: EmuCDirectSound_SynchPlayback\n" "(\n" " pUnknown : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pUnknown); + pUnknown); @@ -2001,12 +2001,12 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_Pause { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_Pause\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_Pause\n" "(\n" " pStream : 0x%.08X\n" " dwPause : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pStream, dwPause); + pStream, dwPause); @@ -2024,12 +2024,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundStream_SetHeadroom { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundStream_SetHeadroom\n" + DbgPrintf("EmuDSound: EmuIDirectSoundStream_SetHeadroom\n" "(\n" " pThis : 0x%.08X\n" " dwHeadroom : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwHeadroom); + pThis, dwHeadroom); // TODO: Actually implement this @@ -2051,14 +2051,14 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetConeAngles { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetConeAngles\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetConeAngles\n" "(\n" " pThis : 0x%.08X\n" " dwInsideConeAngle : 0x%.08X\n" " dwOutsideConeAngle : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwInsideConeAngle, dwOutsideConeAngle, dwApply); + pThis, dwInsideConeAngle, dwOutsideConeAngle, dwApply); // TODO: Actually implement this @@ -2079,13 +2079,13 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetConeOutsideVolume { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetConeOutsideVolume\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetConeOutsideVolume\n" "(\n" " pThis : 0x%.08X\n" " lConeOutsideVolume : %d\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, lConeOutsideVolume, dwApply); + pThis, lConeOutsideVolume, dwApply); // TODO: Actually implement this @@ -2106,13 +2106,13 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetAllParameters { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetAllParameters\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetAllParameters\n" "(\n" " pThis : 0x%.08X\n" " pUnknown : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pUnknown, dwApply); + pThis, pUnknown, dwApply); // TODO: Actually implement this @@ -2133,13 +2133,13 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetMaxDistance { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetMaxDistance\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetMaxDistance\n" "(\n" " pThis : 0x%.08X\n" " fMaxDistance : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, fMaxDistance, dwApply); + pThis, fMaxDistance, dwApply); // TODO: Actually implement this @@ -2160,13 +2160,13 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetMinDistance { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetMinDistance\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetMinDistance\n" "(\n" " pThis : 0x%.08X\n" " fMinDistance : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, fMinDistance, dwApply); + pThis, fMinDistance, dwApply); // TODO: Actually implement this @@ -2189,7 +2189,7 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetVelocity { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetVelocity\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetVelocity\n" "(\n" " pThis : 0x%.08X\n" " x : %f\n" @@ -2197,7 +2197,7 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetVelocity " z : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, x, y, z, dwApply); + pThis, x, y, z, dwApply); // TODO: Actually implement this @@ -2220,7 +2220,7 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetConeOrientation { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetConeOrientation\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetConeOrientation\n" "(\n" " pThis : 0x%.08X\n" " x : %f\n" @@ -2228,7 +2228,7 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetConeOrientation " z : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, x, y, z, dwApply); + pThis, x, y, z, dwApply); // TODO: Actually implement this @@ -2251,7 +2251,7 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetPosition { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetPosition\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetPosition\n" "(\n" " pThis : 0x%.08X\n" " x : %f\n" @@ -2259,7 +2259,7 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetPosition " z : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, x, y, z, dwApply); + pThis, x, y, z, dwApply); // TODO: Actually implement this @@ -2279,12 +2279,12 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetFrequency { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetFrequency\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetFrequency\n" "(\n" " pThis : 0x%.08X\n" " dwFrequency : %d\n" ");\n", - GetCurrentThreadId(), pThis, dwFrequency); + pThis, dwFrequency); // TODO: Actually implement this @@ -2305,13 +2305,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundStream_SetI3DL2Source { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundStream_SetI3DL2Source\n" + DbgPrintf("EmuDSound: EmuIDirectSoundStream_SetI3DL2Source\n" "(\n" " pThis : 0x%.08X\n" " pds3db : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pds3db, dwApply); + pThis, pds3db, dwApply); // TODO: Actually implement this @@ -2331,12 +2331,12 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetMixBins { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetMixBins\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetMixBins\n" "(\n" " pThis : 0x%.08X\n" " pMixBins : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pMixBins); + pThis, pMixBins); // TODO: Actually implement this. @@ -2356,12 +2356,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundStream_Unknown1 { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundStream_Unknown1\n" + DbgPrintf("EmuDSound: EmuIDirectSoundStream_Unknown1\n" "(\n" " pThis : 0x%.08X\n" " dwUnknown1 : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwUnknown1); + pThis, dwUnknown1); // TODO: Actually implement this @@ -2381,13 +2381,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetMaxDistance DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetMaxDistance\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetMaxDistance\n" "(\n" " pThis : 0x%.08X\n" " flMaxDistance : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, flMaxDistance, dwApply); + pThis, flMaxDistance, dwApply); // TODO: Actually do something @@ -2404,13 +2404,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetMinDistance DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetMinDistance\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetMinDistance\n" "(\n" " pThis : 0x%.08X\n" " flMinDistance : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, flMinDistance, dwApply); + pThis, flMinDistance, dwApply); // TODO: Actually do something @@ -2427,13 +2427,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetRolloffFactor DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetRolloffFactor\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetRolloffFactor\n" "(\n" " pThis : 0x%.08X\n" " flRolloffFactor : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, flRolloffFactor, dwApply); + pThis, flRolloffFactor, dwApply); // TODO: Actually do something @@ -2450,13 +2450,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetDistanceFactor DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetDistanceFactor\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetDistanceFactor\n" "(\n" " pThis : 0x%.08X\n" " flDistanceFactor : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, flDistanceFactor, dwApply); + pThis, flDistanceFactor, dwApply); // TODO: Actually do something @@ -2474,14 +2474,14 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetConeAngles DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetConeAngles\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetConeAngles\n" "(\n" " pThis : 0x%.08X\n" " dwInsideConeAngle : 0x%.08X\n" " dwOutsideConeAngle : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwInsideConeAngle, + pThis, dwInsideConeAngle, dwOutsideConeAngle, dwApply); // TODO: Actually do something @@ -2501,7 +2501,7 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetConeOrientation DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetConeOrientation\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetConeOrientation\n" "(\n" " pThis : 0x%.08X\n" " x : %f\n" @@ -2509,7 +2509,7 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetConeOrientation " z : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, x, y, z, dwApply); + pThis, x, y, z, dwApply); // TODO: Actually do something @@ -2526,13 +2526,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetConeOutsideVolume DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetConeOutsideVolume\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetConeOutsideVolume\n" "(\n" " pThis : 0x%.08X\n" " lConeOutsideVolume : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, lConeOutsideVolume, dwApply); + pThis, lConeOutsideVolume, dwApply); // TODO: Actually do something @@ -2551,7 +2551,7 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetPosition DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetPosition\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetPosition\n" "(\n" " pThis : 0x%.08X\n" " x : %f\n" @@ -2559,7 +2559,7 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetPosition " z : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, x, y, z, dwApply); + pThis, x, y, z, dwApply); // TODO: Actually do something @@ -2578,7 +2578,7 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetVelocity DWORD dwApply ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetVelocity\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetVelocity\n" "(\n" " pThis : 0x%.08X\n" " x : %f\n" @@ -2586,7 +2586,7 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetVelocity " z : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, x, y, z, dwApply); + pThis, x, y, z, dwApply); // TODO: Actually do something @@ -2604,13 +2604,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetDopplerFactor ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetConeOutsideVolume\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetConeOutsideVolume\n" "(\n" " pThis : 0x%.08X\n" " flDopplerFactor : %f\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, flDopplerFactor, dwApply); + pThis, flDopplerFactor, dwApply); // TODO: Actually do something @@ -2629,13 +2629,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetI3DL2Source ) { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetI3DL2Source\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetI3DL2Source\n" "(\n" " pThis : 0x%.08X\n" " pds3db : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pds3db, dwApply); + pThis, pds3db, dwApply); // TODO: Actually do something @@ -2655,13 +2655,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetMode { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetFormat\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetFormat\n" "(\n" " pBuffer : 0x%.08X\n" " dwMode : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pBuffer, dwMode, dwApply); + pBuffer, dwMode, dwApply); HRESULT hRet = DS_OK; @@ -2684,12 +2684,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetFormat { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetFormat\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetFormat\n" "(\n" " pBuffer : 0x%.08X\n" " pwfxFormat : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pBuffer,pwfxFormat); + pBuffer,pwfxFormat); HRESULT hRet = DS_OK; @@ -2708,7 +2708,7 @@ STDAPI_(void) EmuDirectSoundUseFullHRTF { - DbgPrintf("EmuDSound (0x%X): EmuDirectSoundUseFullHRTF()\n", GetCurrentThreadId()); + DbgPrintf("EmuDSound: EmuDirectSoundUseFullHRTF()\n"); // TODO: Actually implement this @@ -2726,12 +2726,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetLFO { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetLFO\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetLFO\n" "(\n" " pThis : 0x%.08X\n" " pLFODesc : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pLFODesc); + pThis, pLFODesc); // TODO: Implement @@ -2752,13 +2752,13 @@ VOID WINAPI XTL::EmuXAudioCreateAdpcmFormat { - DbgPrintf("EmuDSound (0x%X): EmuXAudioCreateAdpcmFormat\n" + DbgPrintf("EmuDSound: EmuXAudioCreateAdpcmFormat\n" "(\n" " nChannels : 0x%.04X\n" " nSamplesPerSec : 0x%.08X\n" " pwfx : 0x%.08X\n" ");\n", - GetCurrentThreadId(), nChannels, nSamplesPerSec, pwfx); + nChannels, nSamplesPerSec, pwfx); // Fill out the pwfx structure with the appropriate data pwfx->wfx.wFormatTag = WAVE_FORMAT_XBOX_ADPCM; @@ -2786,14 +2786,14 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetRolloffCurve { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetRolloffCurve\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetRolloffCurve\n" "(\n" " pThis : 0x%.08X\n" " pflPoints : 0x%.08X\n" " dwPointCount : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pflPoints, dwPointCount, dwApply); + pThis, pflPoints, dwPointCount, dwApply); // TODO: Implement @@ -2813,12 +2813,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundStream_SetVolume { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundStream_SetVolume\n" + DbgPrintf("EmuDSound: EmuIDirectSoundStream_SetVolume\n" "(\n" " pStream : 0x%.08X\n" " lVolume : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pStream, lVolume); + pStream, lVolume); // TODO: Implement @@ -2839,12 +2839,12 @@ HRESULT WINAPI XTL::EmuIDirectSound_EnableHeadphones { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound_EnableHeadphones\n" + DbgPrintf("EmuDSound: EmuIDirectSound_EnableHeadphones\n" "(\n" " pThis : 0x%.08X\n" " fEnabled : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, fEnabled); + pThis, fEnabled); @@ -2861,11 +2861,11 @@ ULONG WINAPI XTL::EmuIDirectSoundBuffer8_AddRef { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer_AddRef\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer_AddRef\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); ULONG ret = 0; @@ -2899,12 +2899,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_Pause { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer_Pause\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer_Pause\n" "(\n" " pThis : 0x%.08X\n" " dwPause : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwPause); + pThis, dwPause); // This function wasn't part of the XDK until 4721. HRESULT ret = S_OK; @@ -2943,13 +2943,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_Pause //{ // // -// DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer_PauseEx\n" +// DbgPrintf("EmuDSound: EmuIDirectSoundBuffer_PauseEx\n" // "(\n" // " pThis : 0x%.08X\n" // " rtTimestamp : 0x%.08X\n" // " dwPause : 0x%.08X\n" // ");\n", -// GetCurrentThreadId(), pThis, rtTimestamp, dwPause); +// pThis, rtTimestamp, dwPause); // // // This function wasn't part of the XDK until 4721. // // TODO: Implement time stamp feature (a thread maybe?) @@ -2990,13 +2990,13 @@ HRESULT WINAPI XTL::EmuIDirectSound8_GetOutputLevels { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_GetOutputLevels\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_GetOutputLevels\n" "(\n" " pThis : 0x%.08X\n" " pOutputLevels : 0x%.08X\n" " bResetPeakValues : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pOutputLevels, bResetPeakValues); + pThis, pOutputLevels, bResetPeakValues); // TODO: Anything? Either way, I've never seen a game to date use this... @@ -3016,12 +3016,12 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetEG { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetEG\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetEG\n" "(\n" " pThis : 0x%.08X\n" " pEnvelopeDesc : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pEnvelopeDesc); + pThis, pEnvelopeDesc); // TODO: Implement this... @@ -3037,7 +3037,7 @@ HRESULT WINAPI XTL::EmuIDirectSoundStream_Flush() { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundStream_Flush()\n", GetCurrentThreadId() ); + DbgPrintf("EmuDSound: EmuIDirectSoundStream_Flush()\n"); // TODO: Actually implement @@ -3058,13 +3058,13 @@ extern "C" HRESULT WINAPI XTL::EmuIDirectSoundStream_FlushEx { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundStream_FlushEx\n" + DbgPrintf("EmuDSound: EmuIDirectSoundStream_FlushEx\n" "(\n" " pThis : 0x%.08X\n" " rtTimeStamp : 0x%.08X\n" " dwFlags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, rtTimeStamp, dwFlags); + pThis, rtTimeStamp, dwFlags); // TODO: Actually implement @@ -3085,13 +3085,13 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetMode { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetFormat\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetFormat\n" "(\n" " pStream : 0x%.08X\n" " dwMode : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pStream, dwMode, dwApply); + pStream, dwMode, dwApply); HRESULT hRet = DS_OK; @@ -3115,14 +3115,14 @@ HRESULT WINAPI XTL::EmuXAudioDownloadEffectsImage { - DbgPrintf("EmuDSound (0x%X): EmuXAudioDownloadEffectsImage\n" + DbgPrintf("EmuDSound: EmuXAudioDownloadEffectsImage\n" "(\n" " pszImageName : 0x%.08X\n" " pImageLoc : 0x%.08X\n" " dwFlags : 0x%.08X\n" " ppImageDesc : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pszImageName, pImageLoc, dwFlags, ppImageDesc ); + pszImageName, pImageLoc, dwFlags, ppImageDesc ); @@ -3140,12 +3140,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetFilter { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetFilter\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetFilter\n" "(\n" " pThis : 0x%.08X\n" " pFilterDesc : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pFilterDesc); + pThis, pFilterDesc); // TODO: Implement @@ -3167,12 +3167,12 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetFilter { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetFilter\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetFilter\n" "(\n" " pThis : 0x%.08X\n" " pFilterDesc : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pFilterDesc); + pThis, pFilterDesc); // TODO: Implement @@ -3196,13 +3196,13 @@ extern "C" HRESULT __stdcall XTL::EmuIDirectSoundBuffer8_PlayEx { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_PlayEx\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_PlayEx\n" "(\n" " pBuffer : 0x%.08X\n" " rtTimeStamp : 0x%.08X\n" " dwFlags : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pBuffer, rtTimeStamp, dwFlags); + pBuffer, rtTimeStamp, dwFlags); if(pBuffer->EmuDirectSoundBuffer8 == 0) EmuWarning("pBuffer->EmuDirectSoundBuffer8 == 0"); @@ -3229,12 +3229,12 @@ HRESULT WINAPI XTL::EmuIDirectSound8_GetCaps { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_GetCaps\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_GetCaps\n" "(\n" " pThis : 0x%.08X\n" " pDSCaps : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pDSCaps); + pThis, pDSCaps); // Get PC's DirectSound capabilities DSCAPS DSCapsPC; @@ -3270,12 +3270,12 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetPitch { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundStream_SetPitch\n" + DbgPrintf("EmuDSound: EmuIDirectSoundStream_SetPitch\n" "(\n" " pThis : 0x%.08X\n" " lPitch : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, lPitch); + pThis, lPitch); HRESULT hRet = S_OK; @@ -3293,7 +3293,7 @@ DWORD WINAPI XTL::EmuDirectSoundGetSampleTime() { - DbgPrintf("EmuDSound (0x%X): EmuDirectSoundGetSampleTime();\n", GetCurrentThreadId()); + DbgPrintf("EmuDSound: EmuDirectSoundGetSampleTime();\n"); // FIXME: This is the best I could think of for now. // Check the XDK documentation for the description of what this function @@ -3322,13 +3322,13 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetMixBinVolumes { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetMixBinVolumes\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetMixBinVolumes\n" "(\n" " pThis : 0x%.08X\n" " dwMixBinMask : 0x%.08X\n" " alVolumes : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwMixBinMask, alVolumes); + pThis, dwMixBinMask, alVolumes); // NOTE: Use this function for XDK 3911 only because the implementation was changed // somewhere around the March 2002 (4361) update (or earlier, maybe). @@ -3349,12 +3349,12 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetMixBinVolumes2 { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetMixBinVolumes\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetMixBinVolumes\n" "(\n" " pThis : 0x%.08X\n" " pMixBins : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pMixBins); + pThis, pMixBins); // NOTE: Read the above notes, and the rest is self explanitory... @@ -3375,13 +3375,13 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetI3DL2Source { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetI3DL2Source\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetI3DL2Source\n" "(\n" " pThis : 0x%.08X\n" " pds3db : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pds3db, dwApply); + pThis, pds3db, dwApply); // TODO: Actually implement this @@ -3402,13 +3402,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetAllParameters { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetAllParameters\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetAllParameters\n" "(\n" " pThis : 0x%.08X\n" " pds3db : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pcDs3dBuffer, dwApply); + pThis, pcDs3dBuffer, dwApply); // TODO: Actually implement this @@ -3428,12 +3428,12 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetFormat { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetFormat\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetFormat\n" "(\n" " pThis : 0x%.08X\n" " pwfxFormat : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pwfxFormat); + pThis, pwfxFormat); // TODO: Actually implement this @@ -3460,12 +3460,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetOutputBuffer { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetOutputBuffer\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetOutputBuffer\n" "(\n" " pThis : 0x%.08X\n" " pOutputBuffer : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pOutputBuffer); + pThis, pOutputBuffer); // TODO: Implement @@ -3485,12 +3485,12 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetOutputBuffer { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetOutputBuffer\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetOutputBuffer\n" "(\n" " pThis : 0x%.08X\n" " pOutputBuffer : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pOutputBuffer); + pThis, pOutputBuffer); // TODO: Implement @@ -3510,12 +3510,12 @@ HRESULT WINAPI XTL::EmuXFileCreateMediaObjectEx { - DbgPrintf("EmuDSound (0x%X): EmuXFileCreateMediaObjectEx\n" + DbgPrintf("EmuDSound: EmuXFileCreateMediaObjectEx\n" "(\n" " hFile : 0x%.08X\n" " ppMediaObject : 0x%.08X\n" ");\n", - GetCurrentThreadId(), hFile, ppMediaObject); + hFile, ppMediaObject); // TODO: Implement @@ -3536,13 +3536,13 @@ HRESULT WINAPI XTL::EmuXWaveFileCreateMediaObject { - DbgPrintf("EmuDSound (0x%X): EmuXWaveFileCreateMediaObject\n" + DbgPrintf("EmuDSound: EmuXWaveFileCreateMediaObject\n" "(\n" " pszFileName : (%s)\n" " ppwfxFormat : 0x%.08X\n" " ppMediaObject : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pszFileName, ppwfxFormat, ppMediaObject); + pszFileName, ppwfxFormat, ppMediaObject); // TODO: Implement @@ -3562,12 +3562,12 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetEG { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetEG\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetEG\n" "(\n" " pThis : 0x%.08X\n" " pEnvelopeDesc : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pEnvelopeDesc); + pThis, pEnvelopeDesc); // TODO: Implement @@ -3590,7 +3590,7 @@ HRESULT WINAPI XTL::EmuIDirectSound8_GetEffectData { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_GetEffectData\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_GetEffectData\n" "(\n" " pThis : 0x%.08X\n" " dwEffectIndex : 0x%.08X\n" @@ -3598,7 +3598,7 @@ HRESULT WINAPI XTL::EmuIDirectSound8_GetEffectData " pvData : 0x%.08X\n" " dwDataSize : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwEffectIndex, dwOffset, pvData, dwDataSize); + pThis, dwEffectIndex, dwOffset, pvData, dwDataSize); // TODO: Implement if( !pvData ) @@ -3621,13 +3621,13 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetNotificationPositions { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetNotificationPositions\n" + DbgPrintf("EmuDSound: EmuIDirectSoundBuffer8_SetNotificationPositions\n" "(\n" " pThis : 0x%.08X\n" " dwNotifyCount : 0x%.08X\n" " paNotifies : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwNotifyCount, paNotifies); + pThis, dwNotifyCount, paNotifies); HRESULT hr = DSERR_INVALIDPARAM; @@ -3674,14 +3674,14 @@ HRESULT WINAPI XTL::EmuCDirectSoundStream_SetRolloffCurve { - DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetRolloffCurve\n" + DbgPrintf("EmuDSound: EmuCDirectSoundStream_SetRolloffCurve\n" "(\n" " pThis : 0x%.08X\n" " pflPoints : 0x%.08X\n" " dwPointCount : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pflPoints, dwPointCount, dwApply); + pThis, pflPoints, dwPointCount, dwApply); // TODO: Implement @@ -3705,7 +3705,7 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetEffectData { - DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_SetEffectData\n" + DbgPrintf("EmuDSound: EmuIDirectSound8_SetEffectData\n" "(\n" " pThis : 0x%.08X\n" " dwEfectIndex : 0x%.08X\n" @@ -3714,7 +3714,7 @@ HRESULT WINAPI XTL::EmuIDirectSound8_SetEffectData " dwDataSize : 0x%.08X\n" " dwApply : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, dwEffectIndex, dwOffset, pvData, dwDataSize, dwApply); + pThis, dwEffectIndex, dwOffset, pvData, dwDataSize, dwApply); // TODO: Implement @@ -3735,17 +3735,17 @@ HRESULT WINAPI XTL::EmuXFileCreateMediaObjectAsync { - DbgPrintf("EmuDSound (0x%X): EmuXFileCreateMediaObjectAsync\n" + DbgPrintf("EmuDSound: EmuXFileCreateMediaObjectAsync\n" "(\n" " hFile : 0x%.08X\n" " dwMaxPackets : 0x%.08X\n" " ppMediaObject : 0x%.08X\n" ");\n", - GetCurrentThreadId(), hFile, dwMaxPackets, ppMediaObject); + hFile, dwMaxPackets, ppMediaObject); // TODO: Implement - EmuWarning( "XFileCreateMediaObjectAsync not yet (properly) implemented!!!\n" ); + EmuWarning( "XFileCreateMediaObjectAsync not yet (properly) implemented!!!" ); *ppMediaObject = new X_XFileMediaObject(); @@ -3767,14 +3767,14 @@ HRESULT WINAPI XTL::EmuXFileMediaObject_Seek { - DbgPrintf("EmuDSound (0x%X): EmuXFileMediaObject_Seek\n" + DbgPrintf("EmuDSound: EmuXFileMediaObject_Seek\n" "(\n" " pThis : 0x%.08X\n" " lOffset : 0x%.08X\n" " dwOrigin : 0x%.08X\n" " pdwAbsolute : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, lOffset, dwOrigin, pdwAbsolute); + pThis, lOffset, dwOrigin, pdwAbsolute); // TODO: Implement @@ -3790,11 +3790,11 @@ VOID WINAPI XTL::EmuXFileMediaObject_DoWork(X_XFileMediaObject* pThis) { - DbgPrintf("EmuDSound (0x%X): EmuXFileMediaObject_DoWork\n" + DbgPrintf("EmuDSound: EmuXFileMediaObject_DoWork\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); // TODO: Implement @@ -3812,12 +3812,12 @@ HRESULT WINAPI XTL::EmuXFileMediaObject_GetStatus { - DbgPrintf("EmuDSound (0x%X): EmuXFileMediaObject_GetStatus\n" + DbgPrintf("EmuDSound: EmuXFileMediaObject_GetStatus\n" "(\n" " pThis : 0x%.08X\n" " pdwStatus : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pdwStatus); + pThis, pdwStatus); // TODO: Implement @@ -3837,12 +3837,12 @@ HRESULT WINAPI XTL::EmuXFileMediaObject_GetInfo { - DbgPrintf("EmuDSound (0x%X): EmuXFileMediaObject_GetStatus\n" + DbgPrintf("EmuDSound: EmuXFileMediaObject_GetStatus\n" "(\n" " pThis : 0x%.08X\n" " pInfo : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pInfo); + pThis, pInfo); // TODO: Implement @@ -3863,13 +3863,13 @@ HRESULT WINAPI XTL::EmuXFileMediaObject_Process { - DbgPrintf("EmuDSound (0x%X): EmuXFileMediaObject_Process\n" + DbgPrintf("EmuDSound: EmuXFileMediaObject_Process\n" "(\n" " pThis : 0x%.08X\n" " pInputBuffer : 0x%.08X\n" " pOutputBuffer : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis, pInputBuffer, pOutputBuffer); + pThis, pInputBuffer, pOutputBuffer); // TODO: Implement @@ -3885,11 +3885,11 @@ ULONG WINAPI XTL::EmuXFileMediaObject_AddRef(X_XFileMediaObject *pThis) { - DbgPrintf("EmuDSound (0x%X): EmuXFileMediaObject_AddRef\n" + DbgPrintf("EmuDSound: EmuXFileMediaObject_AddRef\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); ULONG Ret = 0; @@ -3911,11 +3911,11 @@ ULONG WINAPI XTL::EmuXFileMediaObject_Release(X_XFileMediaObject *pThis) { - DbgPrintf("EmuDSound (0x%X): EmuXFileMediaObject_Release\n" + DbgPrintf("EmuDSound: EmuXFileMediaObject_Release\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); ULONG Ret = 0; @@ -3941,11 +3941,11 @@ HRESULT WINAPI XTL::EmuXFileMediaObject_Discontinuity(X_XFileMediaObject *pThis) { - DbgPrintf("EmuDSound (0x%X): EmuXFileMediaObject_Discontinuity\n" + DbgPrintf("EmuDSound: EmuXFileMediaObject_Discontinuity\n" "(\n" " pThis : 0x%.08X\n" ");\n", - GetCurrentThreadId(), pThis); + pThis); diff --git a/src/CxbxKrnl/EmuFS.cpp b/src/CxbxKrnl/EmuFS.cpp index e4737ff0b..787f8f965 100644 --- a/src/CxbxKrnl/EmuFS.cpp +++ b/src/CxbxKrnl/EmuFS.cpp @@ -358,26 +358,27 @@ void EmuGenerateFS(Xbe::TLS *pTLS, void *pTLSData) #ifdef _DEBUG_TRACE if (pNewTLS == 0) { - DbgPrintf("EmuFS (0x%X): TLS Non-Existant (OK)\n", GetCurrentThreadId()); + DbgPrintf("EmuFS: TLS Non-Existant (OK)\n"); } else { - DbgPrintf("EmuFS (0x%X): TLS Data Dump...\n", GetCurrentThreadId()); - DbgPrintf("EmuFS (0x%X): 0x%.08X: ", GetCurrentThreadId(), pNewTLS); + DbgPrintf("EmuFS: TLS Data Dump...\n"); + DbgPrintf("EmuFS: 0x%.08X: ", pNewTLS); uint32 stop = pTLS->dwDataEndAddr - pTLS->dwDataStartAddr + pTLS->dwSizeofZeroFill; + // Note : Use printf instead of DbgPrintf here, which prefixes with GetCurrentThreadId() : for (uint32 v = 0;v 0x%.08X\n", GetCurrentThreadId(), MemoryStatistics->Length); + EmuWarning("EmuKrnl: MmQueryStatistics with unusual size -> 0x%.08X", MemoryStatistics->Length); ret = STATUS_INVALID_PARAMETER; } @@ -573,7 +573,7 @@ XBSYSAPI EXPORTNUM(182) xboxkrnl::VOID NTAPI xboxkrnl::MmSetAddressProtect if (!VirtualProtect(BaseAddress, NumberOfBytes, NewProtect & (~PAGE_WRITECOMBINE), &dwOldProtect)) EmuWarning("VirtualProtect Failed!"); - DbgPrintf("EmuKrnl (0x%X): VirtualProtect was 0x%.08X -> 0x%.08X\n", GetCurrentThreadId(), dwOldProtect, NewProtect & (~PAGE_WRITECOMBINE)); + DbgPrintf("EmuKrnl: VirtualProtect was 0x%.08X -> 0x%.08X\n", dwOldProtect, NewProtect & (~PAGE_WRITECOMBINE)); } // ****************************************************************** diff --git a/src/CxbxKrnl/EmuKrnlNt.cpp b/src/CxbxKrnl/EmuKrnlNt.cpp index 58ce916b1..58dd16f32 100644 --- a/src/CxbxKrnl/EmuKrnlNt.cpp +++ b/src/CxbxKrnl/EmuKrnlNt.cpp @@ -209,7 +209,7 @@ XBSYSAPI EXPORTNUM(188) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtCreateDirectoryObje if (FAILED(ret)) EmuWarning("NtCreateDirectoryObject Failed!"); else - DbgPrintf("EmuKrnl (0x%X): NtCreateDirectoryObject DirectoryHandle = 0x%.08X\n", GetCurrentThreadId(), *DirectoryHandle); + DbgPrintf("EmuKrnl: NtCreateDirectoryObject DirectoryHandle = 0x%.08X\n", *DirectoryHandle); RETURN(ret); } @@ -253,7 +253,7 @@ XBSYSAPI EXPORTNUM(189) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtCreateEvent if (FAILED(ret)) EmuWarning("NtCreateEvent Failed!"); else - DbgPrintf("EmuKrnl (0x%X): NtCreateEvent EventHandle = 0x%.08X\n", GetCurrentThreadId(), *EventHandle); + DbgPrintf("EmuKrnl: NtCreateEvent EventHandle = 0x%.08X\n", *EventHandle); RETURN(ret); } @@ -322,7 +322,7 @@ XBSYSAPI EXPORTNUM(192) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtCreateMutant if (FAILED(ret)) EmuWarning("NtCreateMutant Failed!"); else - DbgPrintf("EmuKrnl (0x%X): NtCreateMutant MutantHandle = 0x%.08X\n", GetCurrentThreadId(), *MutantHandle); + DbgPrintf("EmuKrnl: NtCreateMutant MutantHandle = 0x%.08X\n", *MutantHandle); RETURN(ret); } @@ -362,7 +362,7 @@ XBSYSAPI EXPORTNUM(193) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtCreateSemaphore if (FAILED(ret)) EmuWarning("NtCreateSemaphore failed!"); else - DbgPrintf("EmuKrnl (0x%X): NtCreateSemaphore SemaphoreHandle = 0x%.08X\n", GetCurrentThreadId(), *SemaphoreHandle); + DbgPrintf("EmuKrnl: NtCreateSemaphore SemaphoreHandle = 0x%.08X\n", *SemaphoreHandle); RETURN(ret); } @@ -402,7 +402,7 @@ XBSYSAPI EXPORTNUM(194) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtCreateTimer if (FAILED(ret)) EmuWarning("NtCreateTimer failed!"); else - DbgPrintf("EmuKrnl (0x%X): NtCreateTimer TimerHandle = 0x%.08X\n", GetCurrentThreadId(), *TimerHandle); + DbgPrintf("EmuKrnl: NtCreateTimer TimerHandle = 0x%.08X\n", *TimerHandle); RETURN(ret); } @@ -919,7 +919,7 @@ XBSYSAPI EXPORTNUM(210) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtQueryFullAttributes NTToXboxFileInformation(&nativeNetOpenInfo, Attributes, FileNetworkOpenInformation, sizeof(xboxkrnl::FILE_NETWORK_OPEN_INFORMATION)); if (FAILED(ret)) - EmuWarning("NtQueryFullAttributesFile failed! (0x%.08X)\n", ret); + EmuWarning("NtQueryFullAttributesFile failed! (0x%.08X)", ret); RETURN(ret); } @@ -1196,7 +1196,7 @@ XBSYSAPI EXPORTNUM(217) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtQueryVirtualMemory ret = STATUS_SUCCESS; - DbgPrintf("EmuKrnl (0x%X): NtQueryVirtualMemory: Applied fix for Forza Motorsport!\n", GetCurrentThreadId()); + DbgPrintf("EmuKrnl: NtQueryVirtualMemory: Applied fix for Forza Motorsport!\n"); } } @@ -1606,7 +1606,7 @@ XBSYSAPI EXPORTNUM(232) xboxkrnl::VOID NTAPI xboxkrnl::NtUserIoApcDispatcher popad } - DbgPrintf("EmuKrnl (0x%X): NtUserIoApcDispatcher Completed\n", GetCurrentThreadId()); + DbgPrintf("EmuKrnl: NtUserIoApcDispatcher Completed\n"); } // ****************************************************************** diff --git a/src/CxbxKrnl/EmuKrnlPs.cpp b/src/CxbxKrnl/EmuKrnlPs.cpp index 461bda9c5..8096b9a8b 100644 --- a/src/CxbxKrnl/EmuKrnlPs.cpp +++ b/src/CxbxKrnl/EmuKrnlPs.cpp @@ -133,7 +133,7 @@ static unsigned int WINAPI PCSTProxy if (pfnNotificationRoutine == NULL) continue; - DbgPrintf("EmuKrnl (0x%X): Calling pfnNotificationRoutine[%d] (0x%.08X)\n", GetCurrentThreadId(), g_iThreadNotificationCount, pfnNotificationRoutine); + DbgPrintf("EmuKrnl: Calling pfnNotificationRoutine[%d] (0x%.08X)\n", g_iThreadNotificationCount, pfnNotificationRoutine); pfnNotificationRoutine(TRUE); } @@ -299,7 +299,7 @@ XBSYSAPI EXPORTNUM(255) xboxkrnl::NTSTATUS NTAPI xboxkrnl::PsCreateSystemThreadE // *ThreadHandle = CreateThread(NULL, NULL, PCSTProxy, iPCSTProxyParam, NULL, &dwThreadId); - DbgPrintf("EmuKrnl (0x%X): ThreadHandle : 0x%X, ThreadId : 0x%.08X\n", GetCurrentThreadId(), *ThreadHandle, dwThreadId); + DbgPrintf("EmuKrnl: ThreadHandle : 0x%X, ThreadId : 0x%.08X\n", *ThreadHandle, dwThreadId); // we must duplicate this handle in order to retain Suspend/Resume thread rights from a remote thread { @@ -377,7 +377,7 @@ XBSYSAPI EXPORTNUM(258) xboxkrnl::VOID NTAPI xboxkrnl::PsTerminateSystemThread if (pfnNotificationRoutine == NULL) continue; - DbgPrintf("EmuKrnl (0x%X): Calling pfnNotificationRoutine[%d] (0x%.08X)\n", GetCurrentThreadId(), g_iThreadNotificationCount, pfnNotificationRoutine); + DbgPrintf("EmuKrnl: Calling pfnNotificationRoutine[%d] (0x%.08X)\n", g_iThreadNotificationCount, pfnNotificationRoutine); pfnNotificationRoutine(FALSE); } diff --git a/src/CxbxKrnl/EmuNV2A.cpp b/src/CxbxKrnl/EmuNV2A.cpp index 8ea383f6c..f01bda107 100644 --- a/src/CxbxKrnl/EmuNV2A.cpp +++ b/src/CxbxKrnl/EmuNV2A.cpp @@ -510,16 +510,25 @@ DEBUG_START(USER) DEBUG_END(USER) -#define READ32_START(DEV) uint32_t EmuNV2A_##DEV##_Read32(uint32_t addr) { uint32_t result = 0; switch (addr) { -#define READ32_UNHANDLED(DEV) default: EmuWarning("EmuX86_Read32 NV2A_" #DEV "(0x%08X) = 0x%08X [Unhandled, %s]", addr, result, DebugNV_##DEV##(addr)); return result; -#define READ32_END(DEV) } EmuWarning("EmuX86_Read32 NV2A_" #DEV "(0x%08X) = 0x%08X [Handled, %s]", addr, result, DebugNV_##DEV##(addr)); return result; } - -#define WRITE32_START(DEV) void EmuNV2A_##DEV##_Write32(uint32_t addr, uint32_t value) { switch (addr) { -#define WRITE32_UNHANDLED(DEV) default: EmuWarning("EmuX86_Write32 NV2A_" #DEV "(0x%08X, 0x%08X) [Unhandled, %s]", addr, value, DebugNV_##DEV##(addr)); return; -#define WRITE32_END(DEV) } EmuWarning("EmuX86_Write32 NV2A_" #DEV "(0x%08X, 0x%08X) [Handled, %s]", addr, value, DebugNV_##DEV##(addr)); } -READ32_START(PMC) +#define DEBUG_READ32(DEV) DbgPrintf("EmuX86_Read32 NV2A_" #DEV "(0x%08X) = 0x%08X [Handled, %s]\n", addr, result, DebugNV_##DEV##(addr)); +#define DEBUG_READ32_UNHANDLED(DEV) DbgPrintf("EmuX86_Read32 NV2A_" #DEV "(0x%08X) = 0x%08X [Unhandled, %s]\n", addr, result, DebugNV_##DEV##(addr)); + +#define DEBUG_WRITE32(DEV) DbgPrintf("EmuX86_Write32 NV2A_" #DEV "(0x%08X, 0x%08X) [Handled, %s]\n", addr, value, DebugNV_##DEV##(addr)); +#define DEBUG_WRITE32_UNHANDLED(DEV) DbgPrintf("EmuX86_Write32 NV2A_" #DEV "(0x%08X, 0x%08X) [Unhandled, %s]\n", addr, value, DebugNV_##DEV##(addr)); + +#define DEVICE_READ32(DEV) uint32_t EmuNV2A_##DEV##_Read32(uint32_t addr) +#define DEVICE_READ32_SWITCH(addr) uint32_t result = 0; switch (addr) +#define DEVICE_READ32_END(DEV) DEBUG_READ32(DEV); return result + +#define DEVICE_WRITE32(DEV) void EmuNV2A_##DEV##_Write32(uint32_t addr, uint32_t value) +#define DEVICE_WRITE32_SWITCH(DEV, addr) DEBUG_WRITE32(DEV); switch (addr) + + +DEVICE_READ32(PMC) +{ + DEVICE_READ32_SWITCH(addr) { case NV_PMC_BOOT_0: // chipset and stepping: NV2A, A02, Rev 0 result = 0x02A000A2; break; @@ -529,7 +538,6 @@ READ32_START(PMC) case NV_PMC_INTR_EN_0: result = pmc.enabled_interrupts; break; - case 0x0000020C: // What's this address? What does the xbe expect to read here? The Kernel base address perhaps? result = NV20_REG_BASE_KERNEL; break; @@ -543,7 +551,6 @@ READ32_START(PMC) DEVICE_WRITE32(PMC) { DEVICE_WRITE32_SWITCH(PMC, addr) { - case NV_PMC_INTR_0: pmc.pending_interrupts &= ~value; update_irq(); diff --git a/src/CxbxKrnl/EmuX86.cpp b/src/CxbxKrnl/EmuX86.cpp index e04f47c50..2eae64ef2 100644 --- a/src/CxbxKrnl/EmuX86.cpp +++ b/src/CxbxKrnl/EmuX86.cpp @@ -96,27 +96,27 @@ uint32_t EmuX86_Read32(uint32_t addr) uint16_t EmuX86_Read16(uint32_t addr) { - EmuWarning("EmuX86_Read16(0x%08X) Forwarding to EmuX86_Read32...", addr); + DbgPrintf("EmuX86_Read16(0x%08X) Forwarding to EmuX86_Read32...", addr); uint16_t value; if (addr & 2) value = (uint16_t)(EmuX86_Read32(addr - 2) >> 16); else value = (uint16_t)EmuX86_Read32(addr); - EmuWarning("EmuX86_Read16(0x%08X) = 0x%04X", addr, value); + DbgPrintf("EmuX86_Read16(0x%08X) = 0x%04X", addr, value); return value; } uint8_t EmuX86_Read8(uint32_t addr) { - EmuWarning("EmuX86_Read8(0x%08X) Forwarding to EmuX86_Read16...", addr); + DbgPrintf("EmuX86_Read8(0x%08X) Forwarding to EmuX86_Read16...", addr); uint8_t value; if (addr & 1) value = (uint8_t)(EmuX86_Read16(addr - 1) >> 8); else value = (uint8_t)EmuX86_Read16(addr); - EmuWarning("EmuX86_Read8(0x%08X) = 0x%02X", addr, value); + DbgPrintf("EmuX86_Read8(0x%08X) = 0x%02X", addr, value); return value; } @@ -716,7 +716,7 @@ bool EmuX86_DecodeException(LPEXCEPTION_POINTERS e) // and check if it successfully decoded one instruction : if (decodedInstructionsCount != 1) { - EmuWarning("EmuX86: Error decoding opcode at 0x%08X\n", e->ContextRecord->Eip); + EmuWarning("EmuX86: Error decoding opcode at 0x%08X", e->ContextRecord->Eip); } else { diff --git a/src/CxbxKrnl/EmuXapi.cpp b/src/CxbxKrnl/EmuXapi.cpp index 2665a9fd5..8829b30ef 100644 --- a/src/CxbxKrnl/EmuXapi.cpp +++ b/src/CxbxKrnl/EmuXapi.cpp @@ -187,7 +187,7 @@ DWORD WINAPI XTL::EmuXGetDevices if(DeviceType->Reserved[0] == 0 && DeviceType->Reserved[1] == 0 && DeviceType->Reserved[2] == 0) ret = (1 << 0); // Return 1 Controller else - EmuWarning("Unknown DeviceType (0x%.08X, 0x%.08X, 0x%.08X)\n", DeviceType->Reserved[0], DeviceType->Reserved[1], DeviceType->Reserved[2]); + EmuWarning("Unknown DeviceType (0x%.08X, 0x%.08X, 0x%.08X)", DeviceType->Reserved[0], DeviceType->Reserved[1], DeviceType->Reserved[2]); RETURN(ret); } @@ -224,7 +224,7 @@ BOOL WINAPI XTL::EmuXGetDeviceChanges else { // TODO: What if it's not a controller? - EmuWarning("Unknown DeviceType (0x%.08X, 0x%.08X, 0x%.08X)\n", DeviceType->Reserved[0], DeviceType->Reserved[1], DeviceType->Reserved[2]); + EmuWarning("Unknown DeviceType (0x%.08X, 0x%.08X, 0x%.08X)", DeviceType->Reserved[0], DeviceType->Reserved[1], DeviceType->Reserved[2]); } } else @@ -735,13 +735,13 @@ LPVOID WINAPI XTL::EmuCreateFiber LPVOID lpParameter ) { - DbgPrintf("EmuXapi (0x%X): EmuCreateFiber\n" + DbgPrintf("EmuXapi: EmuCreateFiber\n" "(\n" " dwStackSize : 0x%.08X\n" " lpStartRoutine : 0x%.08X\n" " lpParameter : 0x%.08X\n" ");\n", - GetCurrentThreadId(), dwStackSize, lpStartRoutine, lpParameter); + dwStackSize, lpStartRoutine, lpParameter); LPVOID pFiber = CreateFiber( dwStackSize, lpStartRoutine, lpParameter ); if( !pFiber ) @@ -767,11 +767,11 @@ VOID WINAPI XTL::EmuDeleteFiber ) { - DbgPrintf("EmuXapi (0x%X): EmuDeleteFiber\n" + DbgPrintf("EmuXapi: EmuDeleteFiber\n" "(\n" " lpFiber : 0x%.08X\n" ");\n", - GetCurrentThreadId(), lpFiber ); + lpFiber ); DeleteFiber( lpFiber ); @@ -786,11 +786,11 @@ VOID WINAPI XTL::EmuSwitchToFiber ) { - DbgPrintf("EmuXapi (0x%X): EmuSwitchToFiber\n" + DbgPrintf("EmuXapi: EmuSwitchToFiber\n" "(\n" " lpFiber : 0x%.08X\n" ");\n", - GetCurrentThreadId(), lpFiber ); + lpFiber ); // SwitchToFiber( lpFiber ); // <- Hangs/crashes... @@ -816,11 +816,11 @@ LPVOID WINAPI XTL::EmuConvertThreadToFiber LPVOID lpParameter ) { - DbgPrintf("EmuXapi (0x%X): EmuConvertThreadToFiber\n" + DbgPrintf("EmuXapi: EmuConvertThreadToFiber\n" "(\n" " lpParameter : 0x%.08X\n" ");\n", - GetCurrentThreadId(), lpParameter ); + lpParameter ); LPVOID pRet = ConvertThreadToFiber( lpParameter ); @@ -836,11 +836,11 @@ LPVOID WINAPI XTL::EmuConvertThreadToFiber VOID WINAPI XTL::EmuXapiFiberStartup(DWORD dwDummy) { - DbgPrintf("EmuXapi (0x%X): EmuXapiFiberStarup()\n" + DbgPrintf("EmuXapi: EmuXapiFiberStarup()\n" "(\n" " dwDummy : 0x%.08X\n" ");\n", - GetCurrentThreadId(), dwDummy); + dwDummy); typedef void (__stdcall *pfDummyFunc)(DWORD dwDummy); diff --git a/src/CxbxKrnl/HLEIntercept.cpp b/src/CxbxKrnl/HLEIntercept.cpp index b4d03486a..a57ce184f 100644 --- a/src/CxbxKrnl/HLEIntercept.cpp +++ b/src/CxbxKrnl/HLEIntercept.cpp @@ -168,6 +168,8 @@ void EmuHLEIntercept(Xbe::LibraryVersion *pLibraryVersion, Xbe::Header *pXbeHead uint32 LastUnResolvedXRefs = UnResolvedXRefs+1; uint32 OrigUnResolvedXRefs = UnResolvedXRefs; + bool bFoundD3D = false; + for(int p=0;UnResolvedXRefs < LastUnResolvedXRefs;p++) { DbgPrintf("HLE: Starting pass #%d...\n", p+1); @@ -287,6 +289,7 @@ void EmuHLEIntercept(Xbe::LibraryVersion *pLibraryVersion, Xbe::Header *pXbeHead BuildVersion = 3911; if(OrigBuildVersion == 4531) BuildVersion = 4627; + } else if (strcmp(szLibraryName, Lib_XGRAPHC) == 0) { // Skip scanning for XGRAPHC (XG) symbols when LLE GPU is selected