debug trace + dbg input + tweaks
This commit is contained in:
parent
fe0b557719
commit
271d981f9c
17
CxbxKrnl.dsp
17
CxbxKrnl.dsp
|
@ -254,6 +254,10 @@ SOURCE=.\Include\Cxbx.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Include\Win32\CxbxKrnl\DbgConsole.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Include\Win32\CxbxKrnl\Emu.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -486,7 +490,20 @@ SOURCE=.\Source\Win32\CxbxKrnl\EmuD3D8\VertexShader.cpp
|
|||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Source\Win32\CxbxKrnl\DbgConsole.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Source\Win32\CxbxKrnl\Emu.cpp
|
||||
|
||||
!IF "$(CFG)" == "CxbxKrnl - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug"
|
||||
|
||||
# ADD CPP /Od
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
|
|
@ -55,10 +55,10 @@ typedef signed short sint16;
|
|||
typedef signed long sint32;
|
||||
|
||||
// define this to trace intercepted function calls
|
||||
#define _DEBUG_TRACE
|
||||
//#define _DEBUG_TRACE
|
||||
|
||||
// define this to trace warnings
|
||||
#define _DEBUG_WARNINGS
|
||||
//#define _DEBUG_WARNINGS
|
||||
|
||||
// version information
|
||||
#ifndef _DEBUG_TRACE
|
||||
|
@ -87,9 +87,11 @@ enum DebugMode
|
|||
// maximum number of threads cxbx can handle
|
||||
#define MAXIMUM_XBOX_THREADS 256
|
||||
|
||||
extern volatile bool g_bPrintfOn;
|
||||
|
||||
// convienance debug output macros
|
||||
#ifdef _DEBUG_TRACE
|
||||
#define DbgPrintf printf
|
||||
#define DbgPrintf if(g_bPrintfOn) printf
|
||||
#else
|
||||
inline void null_func(...) { }
|
||||
#define DbgPrintf null_func
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
// ******************************************************************
|
||||
// *
|
||||
// * .,-::::: .,:: .::::::::. .,:: .:
|
||||
// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;;
|
||||
// * [[[ '[[,,[[' [[[__[[\. '[[,,[['
|
||||
// * $$$ Y$$$P $$""""Y$$ Y$$$P
|
||||
// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo,
|
||||
// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm,
|
||||
// *
|
||||
// * Cxbx->Win32->CxbxKrnl->EmuD3D8->VertexShader.h
|
||||
// *
|
||||
// * This file is part of the Cxbx project.
|
||||
// *
|
||||
// * Cxbx and Cxbe are free software; you can redistribute them
|
||||
// * and/or modify them under the terms of the GNU General Public
|
||||
// * License as published by the Free Software Foundation; either
|
||||
// * version 2 of the license, or (at your option) any later version.
|
||||
// *
|
||||
// * This program is distributed in the hope that it will be useful,
|
||||
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// * GNU General Public License for more details.
|
||||
// *
|
||||
// * You should have recieved a copy of the GNU General Public License
|
||||
// * along with this program; see the file COPYING.
|
||||
// * If not, write to the Free Software Foundation, Inc.,
|
||||
// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA.
|
||||
// *
|
||||
// * (c) 2002-2003 Aaron Robinson <caustik@caustik.com>
|
||||
// *
|
||||
// * All rights reserved
|
||||
// *
|
||||
// ******************************************************************
|
||||
#ifndef DBGCONSOLE_H
|
||||
#define DBGCONSOLE_H
|
||||
|
||||
#include "Cxbx.h"
|
||||
|
||||
// debug console input
|
||||
class DbgConsole
|
||||
{
|
||||
public:
|
||||
DbgConsole();
|
||||
~DbgConsole();
|
||||
|
||||
// process commands
|
||||
void Process();
|
||||
|
||||
// parse an individual command
|
||||
void ParseCommand();
|
||||
|
||||
// reset input buffer & display prompt
|
||||
void Reset();
|
||||
|
||||
private:
|
||||
// keyboard buffer
|
||||
char m_szInput[1024];
|
||||
uint m_cur;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,153 @@
|
|||
// ******************************************************************
|
||||
// *
|
||||
// * .,-::::: .,:: .::::::::. .,:: .:
|
||||
// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;;
|
||||
// * [[[ '[[,,[[' [[[__[[\. '[[,,[['
|
||||
// * $$$ Y$$$P $$""""Y$$ Y$$$P
|
||||
// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo,
|
||||
// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm,
|
||||
// *
|
||||
// * Cxbx->Win32->CxbxKrnl->DbgConsole.cpp
|
||||
// *
|
||||
// * This file is part of the Cxbx project.
|
||||
// *
|
||||
// * Cxbx and Cxbe are free software; you can redistribute them
|
||||
// * and/or modify them under the terms of the GNU General Public
|
||||
// * License as published by the Free Software Foundation; either
|
||||
// * version 2 of the license, or (at your option) any later version.
|
||||
// *
|
||||
// * This program is distributed in the hope that it will be useful,
|
||||
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// * GNU General Public License for more details.
|
||||
// *
|
||||
// * You should have recieved a copy of the GNU General Public License
|
||||
// * along with this program; see the file COPYING.
|
||||
// * If not, write to the Free Software Foundation, Inc.,
|
||||
// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA.
|
||||
// *
|
||||
// * (c) 2002-2004 Aaron Robinson <caustik@caustik.com>
|
||||
// * Kingofc <kingofc@freenet.de>
|
||||
// *
|
||||
// * All rights reserved
|
||||
// *
|
||||
// ******************************************************************
|
||||
#define _CXBXKRNL_INTERNAL
|
||||
#define _XBOXKRNL_DEFEXTRN_
|
||||
|
||||
#include "Emu.h"
|
||||
#include "DbgConsole.h"
|
||||
|
||||
#include <conio.h>
|
||||
|
||||
// prevent name collisions
|
||||
namespace XTL
|
||||
{
|
||||
#include "EmuXTL.h"
|
||||
};
|
||||
|
||||
extern XTL::LPDIRECT3DDEVICE8 g_pD3DDevice8; // Direct3D8 Device
|
||||
|
||||
DbgConsole::DbgConsole()
|
||||
{
|
||||
m_cur = 0;
|
||||
|
||||
printf("CxbxDbg> ");
|
||||
fflush(stdout);
|
||||
|
||||
m_szInput[0] = '\0';
|
||||
}
|
||||
|
||||
DbgConsole::~DbgConsole()
|
||||
{
|
||||
}
|
||||
|
||||
void DbgConsole::Process()
|
||||
{
|
||||
// process all queued key presses
|
||||
while(_kbhit())
|
||||
{
|
||||
char c = _getche();
|
||||
|
||||
if(c == '\r')
|
||||
{
|
||||
ParseCommand();
|
||||
|
||||
printf("CxbxDbg> ");
|
||||
fflush(stdout);
|
||||
|
||||
m_szInput[0] = '\0';
|
||||
m_cur = 0;
|
||||
}
|
||||
else if(c == '\b')
|
||||
{
|
||||
if(m_cur > 0)
|
||||
{
|
||||
printf(" \b");
|
||||
|
||||
m_szInput[--m_cur] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
printf(" ");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_szInput[m_cur++] = c;
|
||||
m_szInput[m_cur] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DbgConsole::Reset()
|
||||
{
|
||||
m_cur = 0;
|
||||
|
||||
fflush(stdout);
|
||||
|
||||
printf("\n");
|
||||
|
||||
printf("CxbxDbg> ");
|
||||
fflush(stdout);
|
||||
|
||||
m_szInput[0] = '\0';
|
||||
}
|
||||
|
||||
void DbgConsole::ParseCommand()
|
||||
{
|
||||
printf("\n");
|
||||
|
||||
// TODO: as command list grows, turn into static string/ptr lookup
|
||||
|
||||
if(stricmp(m_szInput, "help") == 0)
|
||||
{
|
||||
printf("CxbxDbg: \n");
|
||||
printf("CxbxDbg: Cxbx Debug Command List:\n");
|
||||
printf("CxbxDbg: \n");
|
||||
printf("CxbxDbg: HELP, H\n");
|
||||
printf("CxbxDbg: QUIT, Q, EXIT\n");
|
||||
printf("CxbxDbg: TRACE, T\n");
|
||||
printf("CxbxDbg: CLS\n");
|
||||
printf("CxbxDbg: \n");
|
||||
}
|
||||
else if(stricmp(m_szInput, "cls") == 0)
|
||||
{
|
||||
// clear screen using system call
|
||||
system("cls");
|
||||
}
|
||||
else if(stricmp(m_szInput, "q") == 0 || stricmp(m_szInput, "quit") == 0 || stricmp(m_szInput, "exit") == 0)
|
||||
{
|
||||
printf("CxbxDbg: Goodbye...\n");
|
||||
EmuCleanup(NULL);
|
||||
}
|
||||
else if(stricmp(m_szInput, "t") == 0 || stricmp(m_szInput, "trace") == 0)
|
||||
{
|
||||
g_bPrintfOn = !g_bPrintfOn;
|
||||
printf("CxbxDbg: Trace is now %s\n", g_bPrintfOn ? "ON" : "OFF");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("CxbxDbg: Cmd \"%s\" not recognized!\n", m_szInput);
|
||||
}
|
||||
}
|
|
@ -75,6 +75,7 @@ extern HANDLE g_hUDrive = NULL;
|
|||
extern HANDLE g_hZDrive = NULL;
|
||||
extern volatile BOOL g_bEmuSuspended = FALSE;
|
||||
extern volatile BOOL g_bEmuException = FALSE;
|
||||
extern volatile bool g_bPrintfOn = true;
|
||||
|
||||
// global exception patching address
|
||||
extern uint32 g_HaloHack[4] = {0};
|
||||
|
@ -166,6 +167,7 @@ extern "C" CXBXKRNL_API void NTAPI EmuInit
|
|||
if(AllocConsole())
|
||||
{
|
||||
freopen("CONOUT$", "wt", stdout);
|
||||
freopen("CONIN$", "rt", stdin);
|
||||
|
||||
SetConsoleTitle("Cxbx : Kernel Debug Console");
|
||||
|
||||
|
@ -253,7 +255,7 @@ extern "C" CXBXKRNL_API void NTAPI EmuInit
|
|||
if(g_hCurDir == INVALID_HANDLE_VALUE)
|
||||
EmuCleanup("Could not map D:\\\n");
|
||||
|
||||
printf("EmuMain (0x%X): CurDir := %s\n", GetCurrentThreadId(), szBuffer);
|
||||
DbgPrintf("EmuMain (0x%X): CurDir := %s\n", GetCurrentThreadId(), szBuffer);
|
||||
}
|
||||
|
||||
// initialize T:\ and U:\ directories
|
||||
|
@ -339,12 +341,12 @@ extern "C" CXBXKRNL_API void NTAPI EmuInit
|
|||
|
||||
// initialize OpenXDK emulation (non-existant for now at least)
|
||||
if(pLibraryVersion == 0)
|
||||
printf("EmuMain (0x%X): Detected OpenXDK application...\n", GetCurrentThreadId());
|
||||
DbgPrintf("EmuMain (0x%X): Detected OpenXDK application...\n", GetCurrentThreadId());
|
||||
|
||||
// initialize Microsoft XDK emulation
|
||||
if(pLibraryVersion != 0)
|
||||
{
|
||||
printf("EmuMain (0x%X): Detected Microsoft XDK application...\n", GetCurrentThreadId());
|
||||
DbgPrintf("EmuMain (0x%X): Detected Microsoft XDK application...\n", GetCurrentThreadId());
|
||||
|
||||
uint32 dwLibraryVersions = pXbeHeader->dwLibraryVersions;
|
||||
uint32 dwHLEEntries = HLEDataBaseSize/sizeof(HLEData);
|
||||
|
@ -574,7 +576,7 @@ extern "C" CXBXKRNL_API void NTAPI EmuInit
|
|||
printf("Emu: WARNING!! Problem with ExceptionFilter\n");
|
||||
}
|
||||
|
||||
printf("EmuMain (0x%X): Initial thread ended.\n", GetCurrentThreadId());
|
||||
DbgPrintf("EmuMain (0x%X): Initial thread ended.\n", GetCurrentThreadId());
|
||||
|
||||
fflush(stdout);
|
||||
|
||||
|
@ -671,7 +673,7 @@ extern "C" CXBXKRNL_API void NTAPI EmuPanic()
|
|||
if(EmuIsXboxFS())
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
printf("EmuMain (0x%X): EmuPanic()\n", GetCurrentThreadId());
|
||||
DbgPrintf("EmuMain (0x%X): EmuPanic()\n", GetCurrentThreadId());
|
||||
|
||||
EmuCleanup("Kernel Panic!");
|
||||
|
||||
|
@ -1143,9 +1145,13 @@ static void EmuInstallWrappers(OOVPATable *OovpaTable, uint32 OovpaTableSize, vo
|
|||
#endif
|
||||
|
||||
if(OovpaTable[a].lpRedirect == 0)
|
||||
{
|
||||
EmuInstallWrapper(pFunc, EmuXRefFailure);
|
||||
}
|
||||
else
|
||||
{
|
||||
EmuInstallWrapper(pFunc, OovpaTable[a].lpRedirect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -82,12 +82,12 @@ void EmuGenerateFS(Xbe::TLS *pTLS, void *pTLSData)
|
|||
#ifdef _DEBUG_TRACE
|
||||
if(pNewTLS == 0)
|
||||
{
|
||||
printf("EmuFS (0x%X): TLS Non-Existant (OK)\n", GetCurrentThreadId());
|
||||
DbgPrintf("EmuFS (0x%X): TLS Non-Existant (OK)\n", GetCurrentThreadId());
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("EmuFS (0x%X): TLS Data Dump...\n", GetCurrentThreadId());
|
||||
printf("EmuFS (0x%X): 0x%.08X: ", GetCurrentThreadId(), pNewTLS);
|
||||
DbgPrintf("EmuFS (0x%X): TLS Data Dump...\n", GetCurrentThreadId());
|
||||
DbgPrintf("EmuFS (0x%X): 0x%.08X: ", GetCurrentThreadId(), pNewTLS);
|
||||
|
||||
uint32 stop = pTLS->dwDataEndAddr - pTLS->dwDataStartAddr + pTLS->dwSizeofZeroFill;
|
||||
|
||||
|
@ -95,13 +95,13 @@ void EmuGenerateFS(Xbe::TLS *pTLS, void *pTLSData)
|
|||
{
|
||||
uint08 *bByte = (uint08*)pNewTLS + v;
|
||||
|
||||
printf("%.01X", (uint32)*bByte);
|
||||
DbgPrintf("%.01X", (uint32)*bByte);
|
||||
|
||||
if((v+1) % 0x10 == 0 && v+1<stop)
|
||||
printf("\nEmuFS (0x%X): 0x%.08X: ", GetCurrentThreadId(), ((uint32)pNewTLS + v));
|
||||
DbgPrintf("\nEmuFS (0x%X): 0x%.08X: ", GetCurrentThreadId(), ((uint32)pNewTLS + v));
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
DbgPrintf("\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -187,10 +187,7 @@ void EmuGenerateFS(Xbe::TLS *pTLS, void *pTLSData)
|
|||
// swap back into the "OrgFS"
|
||||
EmuSwapFS();
|
||||
|
||||
// debug output
|
||||
#ifdef _DEBUG_TRACE
|
||||
printf("EmuFS (0x%X): OrgFS=%d NewFS=%d pTLS=0x%.08X\n", GetCurrentThreadId(), OrgFS, NewFS, pTLS);
|
||||
#endif
|
||||
DbgPrintf("EmuFS (0x%X): OrgFS=%d NewFS=%d pTLS=0x%.08X\n", GetCurrentThreadId(), OrgFS, NewFS, pTLS);
|
||||
}
|
||||
|
||||
// cleanup fs segment selector emulation
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -70,7 +70,7 @@ PVOID WINAPI XTL::EmuXGIsSwizzledFormat
|
|||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
printf("EmuXapi (0x%X): EmuXGIsSwizzledFormat\n"
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXGIsSwizzledFormat\n"
|
||||
"(\n"
|
||||
" Format : 0x%.08X\n"
|
||||
");\n",
|
||||
|
@ -99,26 +99,19 @@ VOID WINAPI XTL::EmuXGSwizzleRect
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXGSwizzleRect\n"
|
||||
"(\n"
|
||||
" pSource : 0x%.08X\n"
|
||||
" Pitch : 0x%.08X\n"
|
||||
" pRect : 0x%.08X\n"
|
||||
" pDest : 0x%.08X\n"
|
||||
" Width : 0x%.08X\n"
|
||||
" Height : 0x%.08X\n"
|
||||
" pPoint : 0x%.08X\n"
|
||||
" BytesPerPixel : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), pSource, Pitch, pRect, pDest, Width, Height,
|
||||
pPoint, BytesPerPixel);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXGSwizzleRect\n"
|
||||
"(\n"
|
||||
" pSource : 0x%.08X\n"
|
||||
" Pitch : 0x%.08X\n"
|
||||
" pRect : 0x%.08X\n"
|
||||
" pDest : 0x%.08X\n"
|
||||
" Width : 0x%.08X\n"
|
||||
" Height : 0x%.08X\n"
|
||||
" pPoint : 0x%.08X\n"
|
||||
" BytesPerPixel : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), pSource, Pitch, pRect, pDest, Width, Height,
|
||||
pPoint, BytesPerPixel);
|
||||
|
||||
if(pRect == NULL && pPoint == NULL && Pitch == 0)
|
||||
{
|
||||
|
@ -176,28 +169,21 @@ VOID WINAPI XTL::EmuXGSwizzleBox
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXGSwizzleBox\n"
|
||||
"(\n"
|
||||
" pSource : 0x%.08X\n"
|
||||
" RowPitch : 0x%.08X\n"
|
||||
" SlicePitch : 0x%.08X\n"
|
||||
" pBox : 0x%.08X\n"
|
||||
" pDest : 0x%.08X\n"
|
||||
" Width : 0x%.08X\n"
|
||||
" Height : 0x%.08X\n"
|
||||
" Depth : 0x%.08X\n"
|
||||
" pPoint : 0x%.08X\n"
|
||||
" BytesPerPixel : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), pSource, RowPitch, SlicePitch, pBox, pDest, Width, Height,
|
||||
Depth, pPoint, BytesPerPixel);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXGSwizzleBox\n"
|
||||
"(\n"
|
||||
" pSource : 0x%.08X\n"
|
||||
" RowPitch : 0x%.08X\n"
|
||||
" SlicePitch : 0x%.08X\n"
|
||||
" pBox : 0x%.08X\n"
|
||||
" pDest : 0x%.08X\n"
|
||||
" Width : 0x%.08X\n"
|
||||
" Height : 0x%.08X\n"
|
||||
" Depth : 0x%.08X\n"
|
||||
" pPoint : 0x%.08X\n"
|
||||
" BytesPerPixel : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), pSource, RowPitch, SlicePitch, pBox, pDest, Width, Height,
|
||||
Depth, pPoint, BytesPerPixel);
|
||||
|
||||
if(pBox == NULL && pPoint == NULL && RowPitch == 0 && SlicePitch == 0)
|
||||
{
|
||||
|
|
|
@ -64,19 +64,12 @@ int WINAPI XTL::EmuWSAStartup
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuWSAStartup\n"
|
||||
"(\n"
|
||||
" wVersionRequested : 0x%.08X\n"
|
||||
" lpWSAData : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), wVersionRequested, lpWSAData);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuWSAStartup\n"
|
||||
"(\n"
|
||||
" wVersionRequested : 0x%.08X\n"
|
||||
" lpWSAData : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), wVersionRequested, lpWSAData);
|
||||
|
||||
int ret = XTL::WSAStartup(wVersionRequested, lpWSAData);
|
||||
|
||||
|
@ -95,18 +88,11 @@ INT WINAPI XTL::EmuXNetStartup
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXNetStartup\n"
|
||||
"(\n"
|
||||
" pDummy : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), pDummy);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXNetStartup\n"
|
||||
"(\n"
|
||||
" pDummy : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), pDummy);
|
||||
|
||||
EmuSwapFS(); // XBox FS
|
||||
|
||||
|
@ -121,14 +107,7 @@ DWORD WINAPI XTL::EmuXNetGetEthernetLinkStatus()
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXNetGetEthernetLinkStatus();\n", GetCurrentThreadId());
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXNetGetEthernetLinkStatus();\n", GetCurrentThreadId());
|
||||
|
||||
EmuSwapFS(); // XBox FS
|
||||
|
||||
|
@ -148,21 +127,14 @@ SOCKET XTL::EmuThis::Emusocket
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuThis::Emusocket\n"
|
||||
"(\n"
|
||||
" this : 0x%.08X\n"
|
||||
" af : 0x%.08X\n"
|
||||
" type : 0x%.08X\n"
|
||||
" protocol : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), this, af, type, protocol);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuThis::Emusocket\n"
|
||||
"(\n"
|
||||
" this : 0x%.08X\n"
|
||||
" af : 0x%.08X\n"
|
||||
" type : 0x%.08X\n"
|
||||
" protocol : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), this, af, type, protocol);
|
||||
|
||||
SOCKET ret = socket(af, type, protocol);
|
||||
|
||||
|
@ -178,21 +150,14 @@ int XTL::EmuThis::Emubind(SOCKET s, const struct sockaddr FAR *name, int namelen
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuThis::Emubind\n"
|
||||
"(\n"
|
||||
" this : 0x%.08X\n"
|
||||
" s : 0x%.08X\n"
|
||||
" name : 0x%.08X\n"
|
||||
" namelen : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), this, s, name, namelen);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuThis::Emubind\n"
|
||||
"(\n"
|
||||
" this : 0x%.08X\n"
|
||||
" s : 0x%.08X\n"
|
||||
" name : 0x%.08X\n"
|
||||
" namelen : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), this, s, name, namelen);
|
||||
|
||||
// TODO: Host-To-Network order if necessary (probably not?)
|
||||
|
||||
|
@ -210,20 +175,13 @@ int XTL::EmuThis::Emulisten(SOCKET s, int backlog)
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuThis::Emulisten\n"
|
||||
"(\n"
|
||||
" this : 0x%.08X\n"
|
||||
" s : 0x%.08X\n"
|
||||
" listen : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), this, s, backlog);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuThis::Emulisten\n"
|
||||
"(\n"
|
||||
" this : 0x%.08X\n"
|
||||
" s : 0x%.08X\n"
|
||||
" listen : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), this, s, backlog);
|
||||
|
||||
// TODO: Host-To-Network order if necessary (probably not?)
|
||||
|
||||
|
@ -241,21 +199,14 @@ int XTL::EmuThis::Emuioctlsocket(SOCKET s, long cmd, u_long FAR *argp)
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuThis::Emuioctlsocket\n"
|
||||
"(\n"
|
||||
" this : 0x%.08X\n"
|
||||
" s : 0x%.08X\n"
|
||||
" cmd : 0x%.08X\n"
|
||||
" argp : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), this, s, cmd, argp);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuThis::Emuioctlsocket\n"
|
||||
"(\n"
|
||||
" this : 0x%.08X\n"
|
||||
" s : 0x%.08X\n"
|
||||
" cmd : 0x%.08X\n"
|
||||
" argp : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), this, s, cmd, argp);
|
||||
|
||||
int ret = ioctlsocket(s, cmd, argp);
|
||||
|
||||
|
|
|
@ -78,23 +78,16 @@ PVOID WINAPI XTL::EmuRtlCreateHeap
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuRtlCreateHeap\n"
|
||||
"(\n"
|
||||
" Flags : 0x%.08X\n"
|
||||
" Base : 0x%.08X\n"
|
||||
" Reserve : 0x%.08X\n"
|
||||
" Commit : 0x%.08X\n"
|
||||
" Lock : 0x%.08X\n"
|
||||
" RtlHeapParams : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), Flags, Base, Reserve, Commit, Lock, RtlHeapParams);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuRtlCreateHeap\n"
|
||||
"(\n"
|
||||
" Flags : 0x%.08X\n"
|
||||
" Base : 0x%.08X\n"
|
||||
" Reserve : 0x%.08X\n"
|
||||
" Commit : 0x%.08X\n"
|
||||
" Lock : 0x%.08X\n"
|
||||
" RtlHeapParams : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), Flags, Base, Reserve, Commit, Lock, RtlHeapParams);
|
||||
|
||||
NtDll::RTL_HEAP_DEFINITION RtlHeapDefinition;
|
||||
|
||||
|
@ -121,22 +114,15 @@ PVOID WINAPI XTL::EmuRtlAllocateHeap
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
/* too much debug output
|
||||
printf("EmuXapi (0x%X): EmuRtlAllocateHeap\n"
|
||||
"(\n"
|
||||
" hHeap : 0x%.08X\n"
|
||||
" dwFlags : 0x%.08X\n"
|
||||
" dwBytes : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hHeap, dwFlags, dwBytes);
|
||||
//*/
|
||||
}
|
||||
#endif
|
||||
/* too much debug output
|
||||
DbgPrintf("EmuXapi (0x%X): EmuRtlAllocateHeap\n"
|
||||
"(\n"
|
||||
" hHeap : 0x%.08X\n"
|
||||
" dwFlags : 0x%.08X\n"
|
||||
" dwBytes : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hHeap, dwFlags, dwBytes);
|
||||
//*/
|
||||
|
||||
PVOID pRet = NtDll::RtlAllocateHeap(hHeap, dwFlags, dwBytes);
|
||||
|
||||
|
@ -157,22 +143,15 @@ BOOL WINAPI XTL::EmuRtlFreeHeap
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
/* too much debug output
|
||||
printf("EmuXapi (0x%X): EmuRtlFreeHeap\n"
|
||||
"(\n"
|
||||
" hHeap : 0x%.08X\n"
|
||||
" dwFlags : 0x%.08X\n"
|
||||
" lpMem : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hHeap, dwFlags, lpMem);
|
||||
//*/
|
||||
}
|
||||
#endif
|
||||
/* too much debug output
|
||||
DbgPrintf("EmuXapi (0x%X): EmuRtlFreeHeap\n"
|
||||
"(\n"
|
||||
" hHeap : 0x%.08X\n"
|
||||
" dwFlags : 0x%.08X\n"
|
||||
" lpMem : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hHeap, dwFlags, lpMem);
|
||||
//*/
|
||||
|
||||
BOOL bRet = NtDll::RtlFreeHeap(hHeap, dwFlags, lpMem);
|
||||
|
||||
|
@ -194,23 +173,16 @@ PVOID WINAPI XTL::EmuRtlReAllocateHeap
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
//* too much debug output
|
||||
printf("EmuXapi (0x%X): EmuRtlReAllocateHeap\n"
|
||||
"(\n"
|
||||
" hHeap : 0x%.08X\n"
|
||||
" dwFlags : 0x%.08X\n"
|
||||
" lpMem : 0x%.08X\n"
|
||||
" dwBytes : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hHeap, dwFlags, lpMem, dwBytes);
|
||||
//*/
|
||||
}
|
||||
#endif
|
||||
/* too much debug output
|
||||
DbgPrintf("EmuXapi (0x%X): EmuRtlReAllocateHeap\n"
|
||||
"(\n"
|
||||
" hHeap : 0x%.08X\n"
|
||||
" dwFlags : 0x%.08X\n"
|
||||
" lpMem : 0x%.08X\n"
|
||||
" dwBytes : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hHeap, dwFlags, lpMem, dwBytes);
|
||||
//*/
|
||||
|
||||
PVOID pRet = NtDll::RtlReAllocateHeap(hHeap, dwFlags, lpMem, dwBytes);
|
||||
|
||||
|
@ -231,22 +203,15 @@ SIZE_T WINAPI XTL::EmuRtlSizeHeap
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
/* too much debug output
|
||||
printf("EmuXapi (0x%X): EmuRtlSizeHeap\n"
|
||||
"(\n"
|
||||
" hHeap : 0x%.08X\n"
|
||||
" dwFlags : 0x%.08X\n"
|
||||
" lpMem : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hHeap, dwFlags, lpMem);
|
||||
//*/
|
||||
}
|
||||
#endif
|
||||
/* too much debug output
|
||||
DbgPrintf("EmuXapi (0x%X): EmuRtlSizeHeap\n"
|
||||
"(\n"
|
||||
" hHeap : 0x%.08X\n"
|
||||
" dwFlags : 0x%.08X\n"
|
||||
" lpMem : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hHeap, dwFlags, lpMem);
|
||||
//*/
|
||||
|
||||
SIZE_T ret = NtDll::RtlSizeHeap(hHeap, dwFlags, lpMem);
|
||||
|
||||
|
@ -265,18 +230,11 @@ BOOL WINAPI XTL::EmuQueryPerformanceCounter
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuQueryPerformanceCounter\n"
|
||||
"(\n"
|
||||
" lpPerformanceCount : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), lpPerformanceCount);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuQueryPerformanceCounter\n"
|
||||
"(\n"
|
||||
" lpPerformanceCount : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), lpPerformanceCount);
|
||||
|
||||
BOOL bRet = QueryPerformanceCounter(lpPerformanceCount);
|
||||
|
||||
|
@ -295,18 +253,11 @@ BOOL WINAPI XTL::EmuQueryPerformanceFrequency
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuQueryPerformanceFrequency\n"
|
||||
"(\n"
|
||||
" lpFrequency : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), lpFrequency);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuQueryPerformanceFrequency\n"
|
||||
"(\n"
|
||||
" lpFrequency : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), lpFrequency);
|
||||
|
||||
BOOL bRet = QueryPerformanceFrequency(lpFrequency);
|
||||
|
||||
|
@ -323,13 +274,10 @@ BOOL WINAPI XTL::EmuXMountUtilityDrive
|
|||
BOOL fFormatClean
|
||||
)
|
||||
{
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
printf("EmuXapi (0x%X): EmuXMountUtilityDrive\n"
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXMountUtilityDrive\n"
|
||||
"(\n"
|
||||
" fFormatClean : 0x%.08X\n"
|
||||
");\n",
|
||||
|
@ -352,19 +300,12 @@ VOID WINAPI XTL::EmuXInitDevices
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXInitDevices\n"
|
||||
"(\n"
|
||||
" Unknown1 : 0x%.08X\n"
|
||||
" Unknown2 : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), Unknown1, Unknown2);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXInitDevices\n"
|
||||
"(\n"
|
||||
" Unknown1 : 0x%.08X\n"
|
||||
" Unknown2 : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), Unknown1, Unknown2);
|
||||
|
||||
// TODO: Initialize devices if/when necessary
|
||||
|
||||
|
@ -383,18 +324,11 @@ DWORD WINAPI XTL::EmuXGetDevices
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXGetDevices\n"
|
||||
"(\n"
|
||||
" DeviceType : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), DeviceType);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXGetDevices\n"
|
||||
"(\n"
|
||||
" DeviceType : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), DeviceType);
|
||||
|
||||
DWORD ret = 0;
|
||||
|
||||
|
@ -420,20 +354,13 @@ BOOL WINAPI XTL::EmuXGetDeviceChanges
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXGetDeviceChanges\n"
|
||||
"(\n"
|
||||
" DeviceType : 0x%.08X\n"
|
||||
" pdwInsertions : 0x%.08X\n"
|
||||
" pdwRemovals : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), DeviceType, pdwInsertions, pdwRemovals);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXGetDeviceChanges\n"
|
||||
"(\n"
|
||||
" DeviceType : 0x%.08X\n"
|
||||
" pdwInsertions : 0x%.08X\n"
|
||||
" pdwRemovals : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), DeviceType, pdwInsertions, pdwRemovals);
|
||||
|
||||
BOOL bRet = FALSE;
|
||||
BOOL bFirst = TRUE;
|
||||
|
@ -469,21 +396,14 @@ HANDLE WINAPI XTL::EmuXInputOpen
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXInputOpen\n"
|
||||
"(\n"
|
||||
" DeviceType : 0x%.08X\n"
|
||||
" dwPort : 0x%.08X\n"
|
||||
" dwSlot : 0x%.08X\n"
|
||||
" pPollingParameters : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), DeviceType, dwPort, dwSlot, pPollingParameters);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXInputOpen\n"
|
||||
"(\n"
|
||||
" DeviceType : 0x%.08X\n"
|
||||
" dwPort : 0x%.08X\n"
|
||||
" dwSlot : 0x%.08X\n"
|
||||
" pPollingParameters : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), DeviceType, dwPort, dwSlot, pPollingParameters);
|
||||
|
||||
HANDLE ret = NULL;
|
||||
|
||||
|
@ -506,18 +426,11 @@ VOID WINAPI XTL::EmuXInputClose
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXInputClose\n"
|
||||
"(\n"
|
||||
" hDevice : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hDevice);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXInputClose\n"
|
||||
"(\n"
|
||||
" hDevice : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hDevice);
|
||||
|
||||
// TODO: Actually clean up the device when/if necessary
|
||||
|
||||
|
@ -537,19 +450,12 @@ DWORD WINAPI XTL::EmuXInputGetCapabilities
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXInputGetCapabilities\n"
|
||||
"(\n"
|
||||
" hDevice : 0x%.08X\n"
|
||||
" pCapabilities : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hDevice, pCapabilities);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXInputGetCapabilities\n"
|
||||
"(\n"
|
||||
" hDevice : 0x%.08X\n"
|
||||
" pCapabilities : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hDevice, pCapabilities);
|
||||
|
||||
DWORD ret = ERROR_INVALID_HANDLE;
|
||||
|
||||
|
@ -579,19 +485,12 @@ DWORD WINAPI XTL::EmuXInputGetState
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXInputGetState\n"
|
||||
"(\n"
|
||||
" hDevice : 0x%.08X\n"
|
||||
" pState : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hDevice, pState);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXInputGetState\n"
|
||||
"(\n"
|
||||
" hDevice : 0x%.08X\n"
|
||||
" pState : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hDevice, pState);
|
||||
|
||||
DWORD ret = ERROR_INVALID_HANDLE;
|
||||
|
||||
|
@ -622,19 +521,12 @@ DWORD WINAPI XTL::EmuXInputSetState
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXInputSetState\n"
|
||||
"(\n"
|
||||
" hDevice : 0x%.08X\n"
|
||||
" pFeedback : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hDevice, pFeedback);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXInputSetState\n"
|
||||
"(\n"
|
||||
" hDevice : 0x%.08X\n"
|
||||
" pFeedback : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hDevice, pFeedback);
|
||||
|
||||
pFeedback->Header.dwStatus = ERROR_IO_PENDING;
|
||||
|
||||
|
@ -697,20 +589,13 @@ HANDLE WINAPI XTL::EmuCreateMutex
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuCreateMutex\n"
|
||||
"(\n"
|
||||
" lpMutexAttributes : 0x%.08X\n"
|
||||
" bInitialOwner : 0x%.08X\n"
|
||||
" lpName : 0x%.08X (%s)\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), lpMutexAttributes, bInitialOwner, lpName, lpName);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuCreateMutex\n"
|
||||
"(\n"
|
||||
" lpMutexAttributes : 0x%.08X\n"
|
||||
" bInitialOwner : 0x%.08X\n"
|
||||
" lpName : 0x%.08X (%s)\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), lpMutexAttributes, bInitialOwner, lpName, lpName);
|
||||
|
||||
HANDLE hRet = CreateMutex((SECURITY_ATTRIBUTES *)lpMutexAttributes, bInitialOwner, lpName);
|
||||
|
||||
|
@ -729,18 +614,11 @@ BOOL WINAPI XTL::EmuCloseHandle
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuCloseHandle\n"
|
||||
"(\n"
|
||||
" hObject : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hObject);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuCloseHandle\n"
|
||||
"(\n"
|
||||
" hObject : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hObject);
|
||||
|
||||
BOOL bRet = CloseHandle(hObject);
|
||||
|
||||
|
@ -760,19 +638,12 @@ BOOL WINAPI XTL::EmuSetThreadPriorityBoost
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuSetThreadPriorityBoost\n"
|
||||
"(\n"
|
||||
" hThread : 0x%.08X\n"
|
||||
" DisablePriorityBoost: 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hThread, DisablePriorityBoost);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuSetThreadPriorityBoost\n"
|
||||
"(\n"
|
||||
" hThread : 0x%.08X\n"
|
||||
" DisablePriorityBoost: 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hThread, DisablePriorityBoost);
|
||||
|
||||
BOOL bRet = SetThreadPriorityBoost(hThread, DisablePriorityBoost);
|
||||
|
||||
|
@ -795,19 +666,12 @@ BOOL WINAPI XTL::EmuSetThreadPriority
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuSetThreadPriority\n"
|
||||
"(\n"
|
||||
" hThread : 0x%.08X\n"
|
||||
" nPriority : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hThread, nPriority);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuSetThreadPriority\n"
|
||||
"(\n"
|
||||
" hThread : 0x%.08X\n"
|
||||
" nPriority : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hThread, nPriority);
|
||||
|
||||
BOOL bRet = SetThreadPriority(hThread, nPriority);
|
||||
|
||||
|
@ -830,18 +694,11 @@ int WINAPI XTL::EmuGetThreadPriority
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuGetThreadPriority\n"
|
||||
"(\n"
|
||||
" hThread : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hThread);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuGetThreadPriority\n"
|
||||
"(\n"
|
||||
" hThread : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hThread);
|
||||
|
||||
int iRet = GetThreadPriority(hThread);
|
||||
|
||||
|
@ -864,19 +721,12 @@ BOOL WINAPI XTL::EmuGetExitCodeThread
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuGetExitCodeThread\n"
|
||||
"(\n"
|
||||
" hThread : 0x%.08X\n"
|
||||
" lpExitCode : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hThread, lpExitCode);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuGetExitCodeThread\n"
|
||||
"(\n"
|
||||
" hThread : 0x%.08X\n"
|
||||
" lpExitCode : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hThread, lpExitCode);
|
||||
|
||||
BOOL bRet = GetExitCodeThread(hThread, lpExitCode);
|
||||
|
||||
|
@ -892,14 +742,7 @@ VOID WINAPI XTL::EmuXapiInitProcess()
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXapiInitProcess();\n", GetCurrentThreadId());
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXapiInitProcess();\n", GetCurrentThreadId());
|
||||
|
||||
// ******************************************************************
|
||||
// * Call RtlCreateHeap
|
||||
|
@ -947,19 +790,12 @@ VOID WINAPI XTL::EmuXapiThreadStartup
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXapiThreadStartup\n"
|
||||
"(\n"
|
||||
" dwDummy1 : 0x%.08X\n"
|
||||
" dwDummy2 : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), dwDummy1, dwDummy2);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXapiThreadStartup\n"
|
||||
"(\n"
|
||||
" dwDummy1 : 0x%.08X\n"
|
||||
" dwDummy2 : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), dwDummy1, dwDummy2);
|
||||
|
||||
EmuSwapFS(); // XBox FS
|
||||
|
||||
|
@ -982,19 +818,12 @@ XTL::NTSTATUS CDECL XTL::XapiSetupPerTitleDriveLetters(DWORD dwTitleId, LPCWSTR
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): XapiSetupPerTitleDriveLetters\n"
|
||||
"(\n"
|
||||
" dwTitleId : 0x%.08X\n"
|
||||
" wszTitleName : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), dwTitleId, wszTitleName);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): XapiSetupPerTitleDriveLetters\n"
|
||||
"(\n"
|
||||
" dwTitleId : 0x%.08X\n"
|
||||
" wszTitleName : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), dwTitleId, wszTitleName);
|
||||
|
||||
NTSTATUS ret = STATUS_SUCCESS;
|
||||
|
||||
|
@ -1010,20 +839,13 @@ VOID WINAPI XTL::EmuXapiBootDash(DWORD UnknownA, DWORD UnknownB, DWORD UnknownC)
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXapiBootDash\n"
|
||||
"(\n"
|
||||
" UnknownA : 0x%.08X\n"
|
||||
" UnknownB : 0x%.08X\n"
|
||||
" UnknownC : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), UnknownA, UnknownB, UnknownC);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXapiBootDash\n"
|
||||
"(\n"
|
||||
" UnknownA : 0x%.08X\n"
|
||||
" UnknownB : 0x%.08X\n"
|
||||
" UnknownC : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), UnknownA, UnknownB, UnknownC);
|
||||
|
||||
EmuCleanup("Emulation Terminated (XapiBootDash)");
|
||||
|
||||
|
@ -1043,19 +865,12 @@ VOID WINAPI XTL::EmuXRegisterThreadNotifyRoutine
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): EmuXRegisterThreadNotifyRoutine\n"
|
||||
"(\n"
|
||||
" pThreadNotification : 0x%.08X (0x%.08X)\n"
|
||||
" fRegister : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), pThreadNotification, pThreadNotification->pfnNotifyRoutine, fRegister);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): EmuXRegisterThreadNotifyRoutine\n"
|
||||
"(\n"
|
||||
" pThreadNotification : 0x%.08X (0x%.08X)\n"
|
||||
" fRegister : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), pThreadNotification, pThreadNotification->pfnNotifyRoutine, fRegister);
|
||||
|
||||
if(fRegister)
|
||||
{
|
||||
|
@ -1084,18 +899,11 @@ HANDLE WINAPI XTL::EmuXCalculateSignatureBegin
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): XCalculateSignatureBegin\n"
|
||||
"(\n"
|
||||
" dwFlags : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), dwFlags);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): XCalculateSignatureBegin\n"
|
||||
"(\n"
|
||||
" dwFlags : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), dwFlags);
|
||||
|
||||
EmuSwapFS(); // XBox FS
|
||||
|
||||
|
@ -1114,19 +922,12 @@ HANDLE WINAPI XTL::EmuXCalculateSignatureBeginEx
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): XCalculateSignatureBeginEx\n"
|
||||
"(\n"
|
||||
" dwFlags : 0x%.08X\n",
|
||||
" dwAltTitleId : 0x%.08X\n",
|
||||
");\n",
|
||||
GetCurrentThreadId(), dwFlags, dwAltTitleId);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): XCalculateSignatureBeginEx\n"
|
||||
"(\n"
|
||||
" dwFlags : 0x%.08X\n",
|
||||
" dwAltTitleId : 0x%.08X\n",
|
||||
");\n",
|
||||
GetCurrentThreadId(), dwFlags, dwAltTitleId);
|
||||
|
||||
EmuSwapFS(); // XBox FS
|
||||
|
||||
|
@ -1146,20 +947,13 @@ DWORD WINAPI XTL::EmuXCalculateSignatureUpdate
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): XCalculateSignatureUpdate\n"
|
||||
"(\n"
|
||||
" hCalcSig : 0x%.08X\n",
|
||||
" pbData : 0x%.08X\n",
|
||||
" cbData : 0x%.08X\n",
|
||||
");\n",
|
||||
GetCurrentThreadId(), hCalcSig, pbData, cbData);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): XCalculateSignatureUpdate\n"
|
||||
"(\n"
|
||||
" hCalcSig : 0x%.08X\n",
|
||||
" pbData : 0x%.08X\n",
|
||||
" cbData : 0x%.08X\n",
|
||||
");\n",
|
||||
GetCurrentThreadId(), hCalcSig, pbData, cbData);
|
||||
|
||||
EmuSwapFS(); // XBox FS
|
||||
|
||||
|
@ -1177,19 +971,12 @@ DWORD WINAPI XTL::EmuXCalculateSignatureEnd
|
|||
{
|
||||
EmuSwapFS(); // Win2k/XP FS
|
||||
|
||||
// ******************************************************************
|
||||
// * debug trace
|
||||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
printf("EmuXapi (0x%X): XCalculateSignatureEnd\n"
|
||||
"(\n"
|
||||
" hCalcSig : 0x%.08X\n",
|
||||
" pSignature : 0x%.08X\n",
|
||||
");\n",
|
||||
GetCurrentThreadId(), hCalcSig, pSignature);
|
||||
}
|
||||
#endif
|
||||
DbgPrintf("EmuXapi (0x%X): XCalculateSignatureEnd\n"
|
||||
"(\n"
|
||||
" hCalcSig : 0x%.08X\n",
|
||||
" pSignature : 0x%.08X\n",
|
||||
");\n",
|
||||
GetCurrentThreadId(), hCalcSig, pSignature);
|
||||
|
||||
EmuSwapFS(); // XBox FS
|
||||
|
||||
|
|
Loading…
Reference in New Issue