diff --git a/SourceGen/MainController.cs b/SourceGen/MainController.cs index 8a3c544..3b1a2d1 100644 --- a/SourceGen/MainController.cs +++ b/SourceGen/MainController.cs @@ -488,7 +488,7 @@ namespace SourceGen { /// Applies "actionable" settings to the ProjectView, pulling them out of the global /// settings object. If a project is open, refreshes the display list and all sub-windows. /// - private void ApplyAppSettings() { + public void ApplyAppSettings() { Debug.WriteLine("ApplyAppSettings..."); AppSettings settings = AppSettings.Global; @@ -587,6 +587,10 @@ namespace SourceGen { mMainWin.ShowDebugMenu = AppSettings.Global.GetBool(AppSettings.DEBUG_MENU_ENABLED, false); + // Refresh the toolbar checkbox. + mMainWin.DoShowCycleCounts = + AppSettings.Global.GetBool(AppSettings.FMT_SHOW_CYCLE_COUNTS, false); + // Finally, update the display list generator with all the fancy settings. if (CodeLineList != null) { // Regenerate the display list with the latest formatter config and @@ -890,20 +894,22 @@ namespace SourceGen { } mReanalysisTimer.EndTask(refreshTaskStr); + mReanalysisTimer.StartTask("Restore selection and top position"); DisplayListSelection newSel = savedSel.Restore(CodeLineList, out topItemIndex); //newSel.DebugDump(); // Restore the selection. The selection-changed event will cause updates to the // references, notes, and info panels. - mReanalysisTimer.StartTask("Restore selection and top position"); mMainWin.CodeListView_SetSelection(newSel); mMainWin.CodeListView_SetTopIndex(topItemIndex); mReanalysisTimer.EndTask("Restore selection and top position"); // Update the Notes and Symbols windows. References should refresh automatically // when the selection is restored. + mReanalysisTimer.StartTask("Populate Notes and Symbols"); PopulateNotesList(); PopulateSymbolsList(); + mReanalysisTimer.EndTask("Populate Notes and Symbols"); mReanalysisTimer.EndTask("ProjectView.ApplyChanges()"); diff --git a/SourceGen/Res/CommandIcons.xaml b/SourceGen/Res/CommandIcons.xaml index 2f66bec..1aa2e19 100644 --- a/SourceGen/Res/CommandIcons.xaml +++ b/SourceGen/Res/CommandIcons.xaml @@ -216,4 +216,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SourceGen/RuntimeData/Help/settings.html b/SourceGen/RuntimeData/Help/settings.html index 16462a1..d88d877 100644 --- a/SourceGen/RuntimeData/Help/settings.html +++ b/SourceGen/RuntimeData/Help/settings.html @@ -60,8 +60,8 @@ opcode, operand, and comment), like assembly source code does. The "Disassembly" format adds the address and bytes on the left. Use the "All Columns" format to get all columns.

-

When "show cycle counts in comments" is checked, every instruction line -will have an end-of-line comment that indicates the number of cycles +

When "show cycle counts for instructions" is checked, every instruction +line will have an end-of-line comment that indicates the number of cycles required for that instruction. If the cycle count can't be determined solely from a static analysis, e.g. an extra cycle is required if LDA (dp),Y crosses a page boundary, a '+' will be shown. diff --git a/SourceGen/RuntimeData/Help/tutorials.html b/SourceGen/RuntimeData/Help/tutorials.html index 4f98b50..e1e4f92 100644 --- a/SourceGen/RuntimeData/Help/tutorials.html +++ b/SourceGen/RuntimeData/Help/tutorials.html @@ -492,7 +492,7 @@ automatically.

Let's pause briefly to look at the cycle-count feature. Use Edit > Settings to open the app settings panel. In the "miscellaneous" group on the right side, click the "Show cycle counts in comments" -checkbox, then click "OK".

+checkbox, then click "OK". (There's also a toolbar button for this.)

Every line with an instruction now has a cycle count on it. The cycle counts are adjusted for everything SourceGen can figure out. For example, the BEQ on line $205a shows "2+" cycles, meaning that it takes at least two diff --git a/SourceGen/WpfGui/EditAppSettings.xaml b/SourceGen/WpfGui/EditAppSettings.xaml index 5139237..6656416 100644 --- a/SourceGen/WpfGui/EditAppSettings.xaml +++ b/SourceGen/WpfGui/EditAppSettings.xaml @@ -129,7 +129,7 @@ limitations under the License. - diff --git a/SourceGen/WpfGui/MainWindow.xaml b/SourceGen/WpfGui/MainWindow.xaml index 075f85b..70d16ae 100644 --- a/SourceGen/WpfGui/MainWindow.xaml +++ b/SourceGen/WpfGui/MainWindow.xaml @@ -519,6 +519,9 @@ limitations under the License. + + +