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 Output_Dir "Bin\Debug"
|
||||
# PROP Intermediate_Dir "Bin\Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# 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 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
|
||||
# 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
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
|
|
@ -728,21 +728,22 @@ 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);
|
||||
|
||||
m_exe_changed = true;
|
||||
|
||||
UpdateDebugConsoles();
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_VIEW_DEBUGOUTPUTKERNEL_FILE:
|
||||
{
|
||||
if(m_KrnlDebug == DM_NONE || m_KrnlDebug == DM_CONSOLE)
|
||||
m_KrnlDebug = DM_FILE;
|
||||
else
|
||||
if(m_KrnlDebug == DM_FILE)
|
||||
{
|
||||
m_KrnlDebug = DM_NONE;
|
||||
UpdateDebugConsoles();
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateDebugConsoles();
|
||||
}
|
||||
else
|
||||
{
|
||||
OPENFILENAME ofn = {0};
|
||||
|
||||
char filename[260] = "KrnlDebug.txt";
|
||||
|
@ -759,13 +760,20 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
|
|||
ofn.lpstrDefExt = "txt";
|
||||
ofn.Flags = OFN_PATHMUSTEXIST;
|
||||
|
||||
if(GetSaveFileName(&ofn) == FALSE)
|
||||
return false;
|
||||
if(GetSaveFileName(&ofn) != FALSE)
|
||||
{
|
||||
MessageBox(m_hwnd, "This will not take effect until emulation is (re)started.\n", "Cxbx", MB_OK);
|
||||
|
||||
strncpy(m_KrnlDebugFilename, ofn.lpstrFile, 259);
|
||||
|
||||
m_exe_changed = true;
|
||||
|
||||
m_KrnlDebug = DM_FILE;
|
||||
|
||||
UpdateDebugConsoles();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_VIEW_DEBUGOUTPUTGUI_CONSOLE:
|
||||
|
@ -781,15 +789,14 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
|
|||
|
||||
case ID_VIEW_DEBUGOUTPUTGUI_FILE:
|
||||
{
|
||||
if(m_CxbxDebug == DM_NONE || m_CxbxDebug == DM_CONSOLE)
|
||||
m_CxbxDebug = DM_FILE;
|
||||
else
|
||||
if(m_CxbxDebug == DM_FILE)
|
||||
{
|
||||
m_CxbxDebug = DM_NONE;
|
||||
UpdateDebugConsoles();
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateDebugConsoles();
|
||||
}
|
||||
else
|
||||
{
|
||||
OPENFILENAME ofn = {0};
|
||||
|
||||
char filename[260] = "CxbxDebug.txt";
|
||||
|
@ -806,13 +813,17 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
|
|||
ofn.lpstrDefExt = "txt";
|
||||
ofn.Flags = OFN_PATHMUSTEXIST;
|
||||
|
||||
if(GetSaveFileName(&ofn) == FALSE)
|
||||
return false;
|
||||
|
||||
if(GetSaveFileName(&ofn) != FALSE)
|
||||
{
|
||||
strncpy(m_CxbxDebugFilename, ofn.lpstrFile, 259);
|
||||
|
||||
m_CxbxDebug = DM_FILE;
|
||||
|
||||
UpdateDebugConsoles();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_EMULATION_START:
|
||||
|
|
|
@ -123,6 +123,11 @@ void EmuXGenerateFS()
|
|||
mov ax, OrgFS
|
||||
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"
|
||||
" (\n"
|
||||
" DebugConsole : 0x%.08X\n"
|
||||
" DebugFilename : %s"
|
||||
" DebugFilename : \"%s\"\n"
|
||||
" XBEHeader : 0x%.08X\n"
|
||||
" XBEHeaderSize : 0x%.08X\n"
|
||||
" Entry : 0x%.08X\n"
|
||||
|
@ -196,8 +201,6 @@ CXBXKRNL_API void NTAPI EmuXInit(DebugMode DebugConsole, char *DebugFilename, ui
|
|||
{
|
||||
EmuXGenerateFS();
|
||||
|
||||
EmuXSwapFS();
|
||||
|
||||
// TODO: Initialize "new" FS structure
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue