diff --git a/Doc/Todo.txt b/Doc/Todo.txt index 3c44f1d48..ad3565e89 100644 --- a/Doc/Todo.txt +++ b/Doc/Todo.txt @@ -1,7 +1,5 @@ Cxbx Todo (* denotes high priority) - * XAPILIB XapiThreadStartup for 4627 - * Stabilize Heap Allocation (i.e. operator new) -> Crashes after initial commit is full * Stabilize TLS (it's close...) diff --git a/Include/Cxbx.h b/Include/Cxbx.h index 12dc4d1c8..a93ede82c 100644 --- a/Include/Cxbx.h +++ b/Include/Cxbx.h @@ -66,7 +66,7 @@ typedef signed long sint32; // ****************************************************************** // * Define this to trace intercepted function calls // ****************************************************************** -#define _DEBUG_TRACE +//#define _DEBUG_TRACE // ****************************************************************** // * Round up dwValue to nearest multiple of dwMult diff --git a/Resource/Cxbx.rc b/Resource/Cxbx.rc index 94b9b39da..27869f9da 100644 --- a/Resource/Cxbx.rc +++ b/Resource/Cxbx.rc @@ -158,6 +158,7 @@ BEGIN MENUITEM "Config &Controller...", ID_SETTINGS_CONFIG_CONTROLLER MENUITEM "Config &Audio...", ID_SETTINGS_CONFIGURESOUND + , GRAYED MENUITEM "Config &Video...", ID_SETTINGS_CONFIGUREGRAPHICS MENUITEM "", 1 diff --git a/Source/Win32/Cxbx/EmuExe.cpp b/Source/Win32/Cxbx/EmuExe.cpp index 5531827c9..429225f67 100644 --- a/Source/Win32/Cxbx/EmuExe.cpp +++ b/Source/Win32/Cxbx/EmuExe.cpp @@ -516,8 +516,8 @@ EmuExe::EmuExe(Xbe *x_Xbe, DebugMode x_debug_mode, char *x_debug_filename) : Exe { memcpy(pWriteCursor, x_Xbe->m_TLS, sizeof(Xbe::TLS)); pWriteCursor += sizeof(Xbe::TLS); - memcpy(pWriteCursor, x_Xbe->GetTLSData(), RoundUp(x_Xbe->m_TLS->dwDataEndAddr - x_Xbe->m_TLS->dwDataStartAddr, 0x04)); - pWriteCursor += RoundUp(x_Xbe->m_TLS->dwDataEndAddr - x_Xbe->m_TLS->dwDataStartAddr, 0x04); + memcpy(pWriteCursor, x_Xbe->GetTLSData(), x_Xbe->m_TLS->dwDataEndAddr - x_Xbe->m_TLS->dwDataStartAddr); + pWriteCursor += x_Xbe->m_TLS->dwDataEndAddr - x_Xbe->m_TLS->dwDataStartAddr; } // ****************************************************************** @@ -571,7 +571,7 @@ EmuExe::EmuExe(Xbe *x_Xbe, DebugMode x_debug_mode, char *x_debug_filename) : Exe if(x_Xbe->m_TLS != 0) { *(uint32 *)((uint32)m_bzSection[i] + 41) = WriteCursor; - WriteCursor += RoundUp(x_Xbe->m_TLS->dwDataEndAddr - x_Xbe->m_TLS->dwDataStartAddr, 0x04); + WriteCursor += x_Xbe->m_TLS->dwDataEndAddr - x_Xbe->m_TLS->dwDataStartAddr; } else { diff --git a/Source/Win32/CxbxKrnl/EmuD3D8.cpp b/Source/Win32/CxbxKrnl/EmuD3D8.cpp index a03589dcb..9298c8fc5 100644 --- a/Source/Win32/CxbxKrnl/EmuD3D8.cpp +++ b/Source/Win32/CxbxKrnl/EmuD3D8.cpp @@ -404,8 +404,8 @@ HRESULT WINAPI xd3d8::EmuIDirect3D8_CreateDevice { Adapter = D3DADAPTER_DEFAULT; - pPresentationParameters->Windowed = TRUE; - //pPresentationParameters->SwapEffect = D3DSWAPEFFECT_COPY_VSYNC; + //pPresentationParameters->Windowed = TRUE; + pPresentationParameters->SwapEffect = D3DSWAPEFFECT_COPY_VSYNC; hFocusWindow = g_hEmuWindow; @@ -428,8 +428,8 @@ HRESULT WINAPI xd3d8::EmuIDirect3D8_CreateDevice // ****************************************************************** // * TODO: Query for Software Vertex Processing abilities!! // ****************************************************************** - BehaviorFlags = D3DCREATE_SOFTWARE_VERTEXPROCESSING; -// BehaviorFlags = D3DCREATE_HARDWARE_VERTEXPROCESSING; +// BehaviorFlags = D3DCREATE_SOFTWARE_VERTEXPROCESSING; + BehaviorFlags = D3DCREATE_HARDWARE_VERTEXPROCESSING; // ****************************************************************** // * redirect to windows d3d diff --git a/Source/Win32/CxbxKrnl/EmuFS.cpp b/Source/Win32/CxbxKrnl/EmuFS.cpp index 212ca7e95..89f7621f4 100644 --- a/Source/Win32/CxbxKrnl/EmuFS.cpp +++ b/Source/Win32/CxbxKrnl/EmuFS.cpp @@ -96,7 +96,7 @@ void EmuGenerateFS(Xbe::TLS *pTLS, void *pTLSData) { printf("EmuFS (0x%X): TLS Data Dump... \n 0x%.08X: ", GetCurrentThreadId(), pNewTLS); - uint32 stop = pTLS->dwDataEndAddr - pTLS->dwDataStartAddr; + uint32 stop = pTLS->dwDataEndAddr - pTLS->dwDataStartAddr + pTLS->dwSizeofZeroFill; for(uint32 v=0;v