diff --git a/docs/Debugger_Changelog.txt b/docs/Debugger_Changelog.txt index c93e4432..2f23a8e2 100644 --- a/docs/Debugger_Changelog.txt +++ b/docs/Debugger_Changelog.txt @@ -1,6 +1,7 @@ /* +.13 Added: PROFILE LIST now shows how many clock cycles were executed. .12 GH-PR#480: - GH#462: Default to Shift+Left Click to toggle diasm columns + GH#462: Default to Shift+Left Click to toggle disasm columns Use 'disasm click ' to reconfigure this GH#473: Fixed bug caused by Util_MemoryTextFile, Line 51 not zero-terminating buffer by invalidating it. GH#476: Fixed off-by-one bug wrapping in debugger console diff --git a/source/Debugger/Debug.cpp b/source/Debugger/Debug.cpp index b6f4d333..d3cb6c91 100644 --- a/source/Debugger/Debug.cpp +++ b/source/Debugger/Debug.cpp @@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #define ALLOW_INPUT_LOWERCASE 1 // See /docs/Debugger_Changelog.txt for full details - const int DEBUGGER_VERSION = MAKE_VERSION(2,9,0,12); + const int DEBUGGER_VERSION = MAKE_VERSION(2,9,0,13); // Public _________________________________________________________________________________________ @@ -223,6 +223,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ProfileOpcode_t g_aProfileOpcodes[ NUM_OPCODES ]; ProfileOpmode_t g_aProfileOpmodes[ NUM_OPMODES ]; + unsigned __int64 g_nProfileBeginCycles = 0; // g_nCumulativeCycles // PROFILE RESET TCHAR g_FileNameProfile[] = TEXT("Profile.txt"); // changed from .csv to .txt since Excel doesn't give import options. int g_nProfileLine = 0; @@ -8386,7 +8387,15 @@ void ProfileFormat( bool bExport, ProfileFormat_e eFormatMode ) , static_cast(nOpmodeTotal) ); pText = ProfileLinePush(); - sprintf( pText, "\n" ); + sprintf( pText, "===================\n" ); + pText = ProfileLinePush(); + + unsigned int cycles = static_cast(g_nCumulativeCycles - g_nProfileBeginCycles); + sprintf( pText + , "Cycles: " DELIM "%s%9u\n" + , sSeperator2 + , pColorNumber + , cycles ); pText = ProfileLinePush(); } #undef DELIM @@ -8409,6 +8418,8 @@ void ProfileReset() g_aProfileOpmodes[ iOpmode ].m_iOpmode = iOpmode; g_aProfileOpmodes[ iOpmode ].m_nCount = 0; } + + g_nProfileBeginCycles = g_nCumulativeCycles; }