mirror of https://github.com/PCSX2/pcsx2.git
SPU2-X: Made the visual debugger available via configuration dialog.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4211 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
67caeae57e
commit
8a1e8958ed
|
@ -34,6 +34,7 @@ extern bool _WaveLog;
|
|||
extern bool _CoresDump;
|
||||
extern bool _MemDump;
|
||||
extern bool _RegDump;
|
||||
extern bool _visual_debug_enabled;
|
||||
|
||||
static __forceinline bool MsgToConsole() { return _MsgToConsole & DebugEnabled; }
|
||||
|
||||
|
@ -51,6 +52,7 @@ static __forceinline bool WaveLog() { return _WaveLog & DebugEnabled; }
|
|||
static __forceinline bool CoresDump() { return _CoresDump & DebugEnabled; }
|
||||
static __forceinline bool MemDump() { return _MemDump & DebugEnabled; }
|
||||
static __forceinline bool RegDump() { return _RegDump & DebugEnabled; }
|
||||
static __forceinline bool VisualDebug() { return _visual_debug_enabled & DebugEnabled; }
|
||||
|
||||
extern wxString AccessLogFileName;
|
||||
extern wxString DMA4LogFileName;
|
||||
|
|
|
@ -39,6 +39,7 @@ extern bool _WaveLog;
|
|||
extern bool _CoresDump;
|
||||
extern bool _MemDump;
|
||||
extern bool _RegDump;
|
||||
extern bool _visual_debug_enabled;
|
||||
|
||||
/*static __forceinline bool MsgToConsole() { return _MsgToConsole & DebugEnabled; }
|
||||
|
||||
|
|
|
@ -417,13 +417,22 @@ EXPORT_C_(s32) SPU2open(void *pDsp)
|
|||
else
|
||||
gsWindowHandle = 0;
|
||||
|
||||
// uncomment for a visual debug display showing all core's activity!
|
||||
/*if(debugDialogOpen==0)
|
||||
#ifdef PCSX2_DEVBUILD // Define may not be needed but not tested yet. Better make sure.
|
||||
if( IsDevBuild && VisualDebug() )
|
||||
{
|
||||
hDebugDialog = CreateDialogParam(hInstance,MAKEINTRESOURCE(IDD_DEBUG),0,DebugProc,0);
|
||||
ShowWindow(hDebugDialog,SW_SHOWNORMAL);
|
||||
debugDialogOpen=1;
|
||||
}*/
|
||||
if(debugDialogOpen==0)
|
||||
{
|
||||
hDebugDialog = CreateDialogParam(hInstance,MAKEINTRESOURCE(IDD_DEBUG),0,DebugProc,0);
|
||||
ShowWindow(hDebugDialog,SW_SHOWNORMAL);
|
||||
debugDialogOpen=1;
|
||||
}
|
||||
}
|
||||
else if(debugDialogOpen)
|
||||
{
|
||||
DestroyWindow(hDebugDialog);
|
||||
debugDialogOpen=0;
|
||||
}
|
||||
#endif
|
||||
|
||||
IsOpened = true;
|
||||
lClocks = (cyclePtr!=NULL) ? *cyclePtr : 0;
|
||||
|
|
|
@ -37,6 +37,8 @@ bool _CoresDump=false;
|
|||
bool _MemDump=false;
|
||||
bool _RegDump=false;
|
||||
|
||||
bool _visual_debug_enabled=false;
|
||||
|
||||
// this is set true if PCSX2 invokes the SetLogDir callback, which tells SPU2-X to use that over
|
||||
// the configured crap in the ini file.
|
||||
static bool LogLocationSetByPcsx2 = false;
|
||||
|
@ -100,6 +102,8 @@ void ReadSettings()
|
|||
_MemDump = CfgReadBool(Section, L"Dump_Memory",0);
|
||||
_RegDump = CfgReadBool(Section, L"Dump_Regs",0);
|
||||
|
||||
_visual_debug_enabled = CfgReadBool(Section, L"Visual_Debug_Enabled",0);
|
||||
|
||||
CfgReadStr(Section,L"Logs_Folder", CfgLogsFolder, L"logs");
|
||||
CfgReadStr(Section,L"Dumps_Folder",CfgDumpsFolder,L"logs");
|
||||
|
||||
|
@ -139,6 +143,8 @@ void WriteSettings()
|
|||
CfgWriteBool(Section,L"Dump_Memory",_MemDump);
|
||||
CfgWriteBool(Section,L"Dump_Regs", _RegDump);
|
||||
|
||||
CfgWriteBool(Section,L"Visual_Debug_Enabled", _visual_debug_enabled);
|
||||
|
||||
// None of the logs strings are changable via GUI, so no point in bothering to
|
||||
// write them back out.
|
||||
CfgWriteStr(Section,L"Logs_Folder", CfgLogsFolder);
|
||||
|
@ -173,6 +179,7 @@ void EnableControls( HWND hWnd )
|
|||
ENABLE_CONTROL(IDC_DUMPCORE,DebugEnabled);
|
||||
ENABLE_CONTROL(IDC_DUMPMEM, DebugEnabled);
|
||||
ENABLE_CONTROL(IDC_DUMPREGS,DebugEnabled);
|
||||
ENABLE_CONTROL(IDC_DEBUG_VISUAL, IsDevBuild ? DebugEnabled : false);
|
||||
}
|
||||
|
||||
static BOOL CALLBACK DialogProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
|
||||
|
@ -204,6 +211,7 @@ static BOOL CALLBACK DialogProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
|
|||
SET_CHECK(IDC_DUMPCORE,_CoresDump);
|
||||
SET_CHECK(IDC_DUMPMEM, _MemDump);
|
||||
SET_CHECK(IDC_DUMPREGS,_RegDump);
|
||||
SET_CHECK(IDC_DEBUG_VISUAL,_visual_debug_enabled);
|
||||
|
||||
ShowWindow( GetDlgItem( hWnd, IDC_MSG_PUBLIC_BUILD ), !IsDevBuild );
|
||||
}
|
||||
|
@ -241,6 +249,7 @@ static BOOL CALLBACK DialogProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
|
|||
HANDLE_CHECK(IDC_DUMPCORE,_CoresDump);
|
||||
HANDLE_CHECK(IDC_DUMPMEM, _MemDump);
|
||||
HANDLE_CHECK(IDC_DUMPREGS,_RegDump);
|
||||
HANDLE_CHECK(IDC_DEBUG_VISUAL,_visual_debug_enabled);
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ void UpdateDebugDialog()
|
|||
if(!debugDialogOpen) return;
|
||||
|
||||
lCount++;
|
||||
if(lCount>=(SampleRate/100))
|
||||
if(lCount>=(SampleRate/50))
|
||||
{
|
||||
HDC hdc = GetDC(hDebugDialog);
|
||||
|
||||
|
@ -151,4 +151,9 @@ void UpdateDebugDialog()
|
|||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
#else
|
||||
void UpdateDebugDialog()
|
||||
{
|
||||
// Release mode. Nothing to do
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -80,12 +80,12 @@ BEGIN
|
|||
COMBOBOX IDC_SYNCHMODE,163,103,134,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_DEBUG DIALOGEX 0, 0, 326, 525
|
||||
IDD_DEBUG DIALOGEX 0, 0, 306, 551
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "SPU2-X Debug"
|
||||
FONT 9, "Lucida Console", 400, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",IDOK,269,504,50,14
|
||||
DEFPUSHBUTTON "Close",IDOK,249,530,50,14
|
||||
END
|
||||
|
||||
IDD_DSOUND DIALOGEX 0, 0, 196, 218
|
||||
|
@ -157,13 +157,13 @@ BEGIN
|
|||
PUSHBUTTON "Reset Defaults",IDC_RESET_DEFAULTS,61,62,82,12
|
||||
END
|
||||
|
||||
IDD_CONFIG_DEBUG DIALOGEX 0, 0, 292, 154
|
||||
IDD_CONFIG_DEBUG DIALOGEX 0, 0, 292, 239
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "SPU2-X Debugging Options"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,190,135,46,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,241,135,46,14
|
||||
DEFPUSHBUTTON "OK",IDOK,190,220,46,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,241,220,46,14
|
||||
GROUPBOX "",IDC_STATIC,5,5,135,93
|
||||
GROUPBOX "Logfile-only Logs",IDC_STATIC,151,5,136,53
|
||||
GROUPBOX "Dumps (on close)",IDC_STATIC,151,60,135,54
|
||||
|
@ -180,7 +180,9 @@ BEGIN
|
|||
CHECKBOX "Log Register/DMA Actions",IDC_LOGREGS,159,18,101,10,WS_GROUP | NOT WS_TABSTOP
|
||||
CHECKBOX "Log DMA Writes",IDC_LOGDMA,159,31,68,10,NOT WS_TABSTOP
|
||||
CHECKBOX "Log Audio Output",IDC_LOGWAVE,159,44,71,10,NOT WS_TABSTOP
|
||||
LTEXT "Note: This is a non-devel build. For performance reasons, some logging options are disabled; and only available in devel/debug builds.",IDC_MSG_PUBLIC_BUILD,9,118,174,30
|
||||
LTEXT "Note: This is a non-devel build. For performance reasons, some logging options are disabled; and only available in devel/debug builds.",IDC_MSG_PUBLIC_BUILD,9,187,174,30
|
||||
GROUPBOX "Others",IDC_DEBUG_OTHERS,5,104,135,68
|
||||
CONTROL "Show Core Activity",IDC_DEBUG_VISUAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,116,90,11
|
||||
END
|
||||
|
||||
|
||||
|
@ -209,9 +211,9 @@ BEGIN
|
|||
IDD_DEBUG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 319
|
||||
RIGHTMARGIN, 299
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 518
|
||||
BOTTOMMARGIN, 544
|
||||
END
|
||||
|
||||
IDD_DSOUND, DIALOG
|
||||
|
@ -251,7 +253,7 @@ BEGIN
|
|||
LEFTMARGIN, 5
|
||||
RIGHTMARGIN, 287
|
||||
TOPMARGIN, 5
|
||||
BOTTOMMARGIN, 149
|
||||
BOTTOMMARGIN, 234
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
|
|
@ -55,6 +55,8 @@
|
|||
#define IDC_USE_HARDWARE 1062
|
||||
#define IDC_COMBO1 1063
|
||||
#define IDC_SYNCHMODE 1064
|
||||
#define IDC_DEBUG_OTHERS 1065
|
||||
#define IDC_DEBUG_VISUAL 1066
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
@ -62,7 +64,7 @@
|
|||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 119
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1065
|
||||
#define _APS_NEXT_CONTROL_VALUE 1067
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -369,9 +369,8 @@ __forceinline void TimeUpdate(u32 cClocks)
|
|||
lClocks = cClocks - dClocks;
|
||||
}
|
||||
|
||||
// Uncomment for a visual debug display showing all core's activity!
|
||||
// Also need to uncomment a few lines in SPU2open
|
||||
//UpdateDebugDialog();
|
||||
// Visual debug display showing all core's activity! Disabled via #define on release builds.
|
||||
UpdateDebugDialog();
|
||||
|
||||
if( SynchMode == 1 ) // AsyncMix on
|
||||
SndBuffer::UpdateTempoChangeAsyncMixing();
|
||||
|
|
Loading…
Reference in New Issue