diff --git a/Cxbx.opt b/Cxbx.opt index 423a49324..4976b764e 100644 Binary files a/Cxbx.opt and b/Cxbx.opt differ diff --git a/CxbxKrnl.dsp b/CxbxKrnl.dsp index c69fed532..d3f955483 100644 --- a/CxbxKrnl.dsp +++ b/CxbxKrnl.dsp @@ -1,5 +1,5 @@ # Microsoft Developer Studio Project File - Name="CxbxKrnl" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 60000 +# Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 @@ -53,7 +53,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 ws2_32.lib dsound.lib winmm.lib ddraw.lib d3d8.lib dinput8.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /map /machine:I386 /out:"Bin/Cxbx.dll" /libpath:"Lib" +# ADD LINK32 ws2_32.lib dsound.lib winmm.lib ddraw.lib d3dx8.lib d3d8.lib dinput8.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /map /machine:I386 /out:"Bin/Cxbx.dll" /libpath:"Lib" # SUBTRACT LINK32 /profile /pdb:none /debug !ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug" diff --git a/Source/Win32/CxbxKrnl/EmuKrnl.cpp b/Source/Win32/CxbxKrnl/EmuKrnl.cpp index 331153948..2f6001b51 100644 --- a/Source/Win32/CxbxKrnl/EmuKrnl.cpp +++ b/Source/Win32/CxbxKrnl/EmuKrnl.cpp @@ -965,14 +965,16 @@ XBSYSAPI EXPORTNUM(182) VOID NTAPI xboxkrnl::MmSetAddressProtect "(\n" " BaseAddress : 0x%.08X\n" " NumberOfBytes : 0x%.08X\n" - " Persist : 0x%.08X\n" + " NewProtect : 0x%.08X\n" ");\n", GetCurrentThreadId(), BaseAddress, NumberOfBytes, NewProtect); } #endif - // TODO: Actually set protection - EmuWarning("MmSetAddressProtect is being ignored"); + DWORD dwOldProtect; + + if(!VirtualProtect(BaseAddress, NumberOfBytes, NewProtect & (~PAGE_WRITECOMBINE), &dwOldProtect)) + EmuWarning("VirtualProtect Failed!"); EmuSwapFS(); // Xbox FS