Fixing more debug output stuff.
This commit is contained in:
parent
3b8830a2bd
commit
78162a75e4
2
Cxbx.dsp
2
Cxbx.dsp
|
@ -69,6 +69,7 @@ PostBuild_Cmds=cd PostBuild upxCxbx.bat
|
||||||
# PROP Use_Debug_Libraries 1
|
# PROP Use_Debug_Libraries 1
|
||||||
# PROP Output_Dir "Bin\Debug"
|
# PROP Output_Dir "Bin\Debug"
|
||||||
# PROP Intermediate_Dir "Bin\Debug"
|
# PROP Intermediate_Dir "Bin\Debug"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "Include" /I "Include/Win32/" /I "Include/Win32/Cxbxkrnl" /I "Include/Win32/Cxbx" /I "Resource" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /GZ /c
|
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "Include" /I "Include/Win32/" /I "Include/Win32/Cxbxkrnl" /I "Include/Win32/Cxbx" /I "Resource" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||||
|
@ -82,6 +83,7 @@ BSC32=bscmake.exe
|
||||||
LINK32=link.exe
|
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 /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
# 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 /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD 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 /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
# ADD 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 /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||||
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
|
|
@ -728,43 +728,51 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
|
||||||
|
|
||||||
MessageBox(m_hwnd, "This will not take effect until emulation is (re)started.\n", "Cxbx", MB_OK);
|
MessageBox(m_hwnd, "This will not take effect until emulation is (re)started.\n", "Cxbx", MB_OK);
|
||||||
|
|
||||||
|
m_exe_changed = true;
|
||||||
|
|
||||||
UpdateDebugConsoles();
|
UpdateDebugConsoles();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_VIEW_DEBUGOUTPUTKERNEL_FILE:
|
case ID_VIEW_DEBUGOUTPUTKERNEL_FILE:
|
||||||
{
|
{
|
||||||
if(m_KrnlDebug == DM_NONE || m_KrnlDebug == DM_CONSOLE)
|
if(m_KrnlDebug == DM_FILE)
|
||||||
m_KrnlDebug = DM_FILE;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
m_KrnlDebug = DM_NONE;
|
m_KrnlDebug = DM_NONE;
|
||||||
|
|
||||||
UpdateDebugConsoles();
|
UpdateDebugConsoles();
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OPENFILENAME ofn = {0};
|
||||||
|
|
||||||
OPENFILENAME ofn = {0};
|
char filename[260] = "KrnlDebug.txt";
|
||||||
|
|
||||||
char filename[260] = "KrnlDebug.txt";
|
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||||
|
ofn.hwndOwner = m_hwnd;
|
||||||
|
ofn.lpstrFilter = "Text Documents (*.txt)\0*.txt\0";
|
||||||
|
ofn.lpstrFile = filename;
|
||||||
|
ofn.nMaxFile = 260;
|
||||||
|
ofn.nFilterIndex = 1;
|
||||||
|
ofn.lpstrFileTitle = NULL;
|
||||||
|
ofn.nMaxFileTitle = 0;
|
||||||
|
ofn.lpstrInitialDir = NULL;
|
||||||
|
ofn.lpstrDefExt = "txt";
|
||||||
|
ofn.Flags = OFN_PATHMUSTEXIST;
|
||||||
|
|
||||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
if(GetSaveFileName(&ofn) != FALSE)
|
||||||
ofn.hwndOwner = m_hwnd;
|
{
|
||||||
ofn.lpstrFilter = "Text Documents (*.txt)\0*.txt\0";
|
MessageBox(m_hwnd, "This will not take effect until emulation is (re)started.\n", "Cxbx", MB_OK);
|
||||||
ofn.lpstrFile = filename;
|
|
||||||
ofn.nMaxFile = 260;
|
|
||||||
ofn.nFilterIndex = 1;
|
|
||||||
ofn.lpstrFileTitle = NULL;
|
|
||||||
ofn.nMaxFileTitle = 0;
|
|
||||||
ofn.lpstrInitialDir = NULL;
|
|
||||||
ofn.lpstrDefExt = "txt";
|
|
||||||
ofn.Flags = OFN_PATHMUSTEXIST;
|
|
||||||
|
|
||||||
if(GetSaveFileName(&ofn) == FALSE)
|
strncpy(m_KrnlDebugFilename, ofn.lpstrFile, 259);
|
||||||
return false;
|
|
||||||
|
|
||||||
strncpy(m_KrnlDebugFilename, ofn.lpstrFile, 259);
|
m_exe_changed = true;
|
||||||
|
|
||||||
UpdateDebugConsoles();
|
m_KrnlDebug = DM_FILE;
|
||||||
|
|
||||||
|
UpdateDebugConsoles();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -781,37 +789,40 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
|
||||||
|
|
||||||
case ID_VIEW_DEBUGOUTPUTGUI_FILE:
|
case ID_VIEW_DEBUGOUTPUTGUI_FILE:
|
||||||
{
|
{
|
||||||
if(m_CxbxDebug == DM_NONE || m_CxbxDebug == DM_CONSOLE)
|
if(m_CxbxDebug == DM_FILE)
|
||||||
m_CxbxDebug = DM_FILE;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
m_CxbxDebug = DM_NONE;
|
m_CxbxDebug = DM_NONE;
|
||||||
|
|
||||||
UpdateDebugConsoles();
|
UpdateDebugConsoles();
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OPENFILENAME ofn = {0};
|
||||||
|
|
||||||
OPENFILENAME ofn = {0};
|
char filename[260] = "CxbxDebug.txt";
|
||||||
|
|
||||||
char filename[260] = "CxbxDebug.txt";
|
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||||
|
ofn.hwndOwner = m_hwnd;
|
||||||
|
ofn.lpstrFilter = "Text Documents (*.txt)\0*.txt\0";
|
||||||
|
ofn.lpstrFile = filename;
|
||||||
|
ofn.nMaxFile = 260;
|
||||||
|
ofn.nFilterIndex = 1;
|
||||||
|
ofn.lpstrFileTitle = NULL;
|
||||||
|
ofn.nMaxFileTitle = 0;
|
||||||
|
ofn.lpstrInitialDir = NULL;
|
||||||
|
ofn.lpstrDefExt = "txt";
|
||||||
|
ofn.Flags = OFN_PATHMUSTEXIST;
|
||||||
|
|
||||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
if(GetSaveFileName(&ofn) != FALSE)
|
||||||
ofn.hwndOwner = m_hwnd;
|
{
|
||||||
ofn.lpstrFilter = "Text Documents (*.txt)\0*.txt\0";
|
strncpy(m_CxbxDebugFilename, ofn.lpstrFile, 259);
|
||||||
ofn.lpstrFile = filename;
|
|
||||||
ofn.nMaxFile = 260;
|
|
||||||
ofn.nFilterIndex = 1;
|
|
||||||
ofn.lpstrFileTitle = NULL;
|
|
||||||
ofn.nMaxFileTitle = 0;
|
|
||||||
ofn.lpstrInitialDir = NULL;
|
|
||||||
ofn.lpstrDefExt = "txt";
|
|
||||||
ofn.Flags = OFN_PATHMUSTEXIST;
|
|
||||||
|
|
||||||
if(GetSaveFileName(&ofn) == FALSE)
|
m_CxbxDebug = DM_FILE;
|
||||||
return false;
|
|
||||||
|
|
||||||
strncpy(m_CxbxDebugFilename, ofn.lpstrFile, 259);
|
UpdateDebugConsoles();
|
||||||
|
}
|
||||||
|
|
||||||
UpdateDebugConsoles();
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,11 @@ void EmuXGenerateFS()
|
||||||
mov ax, OrgFS
|
mov ax, OrgFS
|
||||||
mov fs:[0x14], ax // FS.ArbitraryUserPointer
|
mov fs:[0x14], ax // FS.ArbitraryUserPointer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ******************************************************************
|
||||||
|
// * Swap back into the "OrgFS"
|
||||||
|
// ******************************************************************
|
||||||
|
EmuXSwapFS();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
@ -158,7 +163,7 @@ CXBXKRNL_API void NTAPI EmuXInit(DebugMode DebugConsole, char *DebugFilename, ui
|
||||||
printf("CxbxKrnl [0x%.08X]: EmuXInit\n"
|
printf("CxbxKrnl [0x%.08X]: EmuXInit\n"
|
||||||
" (\n"
|
" (\n"
|
||||||
" DebugConsole : 0x%.08X\n"
|
" DebugConsole : 0x%.08X\n"
|
||||||
" DebugFilename : %s"
|
" DebugFilename : \"%s\"\n"
|
||||||
" XBEHeader : 0x%.08X\n"
|
" XBEHeader : 0x%.08X\n"
|
||||||
" XBEHeaderSize : 0x%.08X\n"
|
" XBEHeaderSize : 0x%.08X\n"
|
||||||
" Entry : 0x%.08X\n"
|
" Entry : 0x%.08X\n"
|
||||||
|
@ -196,8 +201,6 @@ CXBXKRNL_API void NTAPI EmuXInit(DebugMode DebugConsole, char *DebugFilename, ui
|
||||||
{
|
{
|
||||||
EmuXGenerateFS();
|
EmuXGenerateFS();
|
||||||
|
|
||||||
EmuXSwapFS();
|
|
||||||
|
|
||||||
// TODO: Initialize "new" FS structure
|
// TODO: Initialize "new" FS structure
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue