public frmTraceLogger() { InitializeComponent(); DebugInfo debugInfo = ConfigManager.Config.DebugInfo; if (!debugInfo.TraceLoggerSize.IsEmpty) { this.Size = debugInfo.TraceLoggerSize; } mnuAutoRefresh.Checked = debugInfo.TraceAutoRefresh; _lineCount = debugInfo.TraceLineCount; _entityBinder.Entity = debugInfo.TraceLoggerOptions; _entityBinder.AddBinding("ShowByteCode", chkShowByteCode); _entityBinder.AddBinding("ShowCpuCycles", chkShowCpuCycles); _entityBinder.AddBinding("ShowEffectiveAddresses", chkShowEffectiveAddresses); _entityBinder.AddBinding("ShowMemoryValues", chkShowMemoryValues); _entityBinder.AddBinding("ShowExtraInfo", chkShowExtraInfo); _entityBinder.AddBinding("ShowPpuFrames", chkShowFrameCount); _entityBinder.AddBinding("ShowPpuCycles", chkShowPpuCycles); _entityBinder.AddBinding("ShowPpuScanline", chkShowPpuScanline); _entityBinder.AddBinding("ShowRegisters", chkShowRegisters); _entityBinder.AddBinding("IndentCode", chkIndentCode); _entityBinder.AddBinding("UseLabels", chkUseLabels); _entityBinder.AddBinding("StatusFormat", cboStatusFlagFormat); _entityBinder.UpdateUI(); this.toolTip.SetToolTip(this.picExpressionWarning, "Condition contains invalid syntax or symbols."); this.toolTip.SetToolTip(this.picHelp, "When a condition is given, instructions will only be logged by the trace logger if the condition returns a value not equal to 0 or false." + Environment.NewLine + Environment.NewLine + frmBreakpoint.GetConditionTooltip(false)); }
public frmTraceLogger() { InitializeComponent(); DebugInfo debugInfo = ConfigManager.Config.DebugInfo; if (!debugInfo.TraceLoggerSize.IsEmpty) { this.StartPosition = FormStartPosition.Manual; this.Size = debugInfo.TraceLoggerSize; this.Location = debugInfo.TraceLoggerLocation; } _tooltipManager = new CodeTooltipManager(this, txtTraceLog); txtTraceLog.BaseFont = new Font(debugInfo.TraceFontFamily, debugInfo.TraceFontSize, debugInfo.TraceFontStyle); txtTraceLog.TextZoom = debugInfo.TraceTextZoom; mnuAutoRefresh.Checked = debugInfo.TraceAutoRefresh; _lineCount = debugInfo.TraceLineCount; _entityBinder.Entity = debugInfo.TraceLoggerOptions; _entityBinder.AddBinding("ShowByteCode", chkShowByteCode); _entityBinder.AddBinding("ShowCpuCycles", chkShowCpuCycles); _entityBinder.AddBinding("ShowEffectiveAddresses", chkShowEffectiveAddresses); _entityBinder.AddBinding("ShowMemoryValues", chkShowMemoryValues); _entityBinder.AddBinding("ShowExtraInfo", chkShowExtraInfo); _entityBinder.AddBinding("ShowPpuFrames", chkShowFrameCount); _entityBinder.AddBinding("ShowPpuCycles", chkShowPpuCycles); _entityBinder.AddBinding("ShowPpuScanline", chkShowPpuScanline); _entityBinder.AddBinding("ShowRegisters", chkShowRegisters); _entityBinder.AddBinding("IndentCode", chkIndentCode); _entityBinder.AddBinding("UseLabels", chkUseLabels); _entityBinder.AddBinding("ExtendZeroPage", chkExtendZeroPage); _entityBinder.AddBinding("UseWindowsEol", chkUseWindowsEol); _entityBinder.AddBinding("StatusFormat", cboStatusFlagFormat); _entityBinder.AddBinding("OverrideFormat", chkOverrideFormat); _entityBinder.UpdateUI(); this.toolTip.SetToolTip(this.picExpressionWarning, "Condition contains invalid syntax or symbols."); this.toolTip.SetToolTip(this.picHelp, "When a condition is given, instructions will only be logged by the trace logger if the condition returns a value not equal to 0 or false." + Environment.NewLine + Environment.NewLine + frmBreakpoint.GetConditionTooltip(false)); this.toolTip.SetToolTip(this.picFormatHelp, "You can customize the trace logger's output by enabling the 'Override' option and altering the format." + Environment.NewLine + Environment.NewLine + "The following tags are available: " + Environment.NewLine + "[ByteCode]: The byte code for the instruction (1 to 3 bytes)." + Environment.NewLine + "[Disassembly]: The disassembly for the current instruction." + Environment.NewLine + "[EffectiveAddress]: The effective address used for indirect addressing modes." + Environment.NewLine + "[MemoryValue]: The value stored at the memory location referred to by the instruction." + Environment.NewLine + "[PC]: Program Counter" + Environment.NewLine + "[A]: A register" + Environment.NewLine + "[X]: X register" + Environment.NewLine + "[Y]: Y register" + Environment.NewLine + "[SP]: Stack Pointer" + Environment.NewLine + "[P]: Processor Flags" + Environment.NewLine + "[Cycle]: The current PPU cycle." + Environment.NewLine + "[Scanline]: The current PPU scanline." + Environment.NewLine + "[FrameCount]: The current PPU frame." + Environment.NewLine + "[CycleCount]: The current CPU cycle (32-bit signed value, resets to 0 at power on)" + Environment.NewLine + Environment.NewLine + "You can also specify some options by using a comma. e.g:" + Environment.NewLine + "[Cycle,3] will display the cycle and pad out the output to always be 3 characters wide." + Environment.NewLine + "[Scanline,h] will display the scanline in hexadecimal." + Environment.NewLine + "[Align,50]: Align is a special tag that is useful when trying to align some content. [Align,50] will make the next tag start on column 50." ); this._initialized = true; }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); HexEditorInfo config = ConfigManager.Config.Debug.HexEditor; _entityBinder.Entity = config; _entityBinder.AddBinding(nameof(config.AutoRefresh), mnuAutoRefresh); _entityBinder.AddBinding(nameof(config.HighDensityTextMode), mnuHighDensityMode); _entityBinder.AddBinding(nameof(config.ByteEditingMode), mnuByteEditingMode); _entityBinder.AddBinding(nameof(config.EnablePerByteNavigation), mnuEnablePerByteNavigation); _entityBinder.AddBinding(nameof(config.IgnoreRedundantWrites), mnuIgnoreRedundantWrites); _entityBinder.AddBinding(nameof(config.HighlightCurrentRowColumn), mnuHighlightCurrentRowColumn); _entityBinder.AddBinding(nameof(config.ShowCharacters), mnuShowCharacters); _entityBinder.AddBinding(nameof(config.ShowLabelInfo), mnuShowLabelInfoOnMouseOver); _entityBinder.AddBinding(nameof(config.HighlightExecution), mnuHighlightExecution); _entityBinder.AddBinding(nameof(config.HighlightReads), mnuHightlightReads); _entityBinder.AddBinding(nameof(config.HighlightWrites), mnuHighlightWrites); _entityBinder.AddBinding(nameof(config.HideUnusedBytes), mnuHideUnusedBytes); _entityBinder.AddBinding(nameof(config.HideReadBytes), mnuHideReadBytes); _entityBinder.AddBinding(nameof(config.HideWrittenBytes), mnuHideWrittenBytes); _entityBinder.AddBinding(nameof(config.HideExecutedBytes), mnuHideExecutedBytes); _entityBinder.AddBinding(nameof(config.HighlightLabelledBytes), mnuHighlightLabelledBytes); _entityBinder.AddBinding(nameof(config.HighlightBreakpoints), mnuHighlightBreakpoints); _entityBinder.AddBinding(nameof(config.HighlightCodeBytes), mnuHighlightCodeBytes); _entityBinder.AddBinding(nameof(config.HighlightDataBytes), mnuHighlightDataBytes); _entityBinder.UpdateUI(); UpdateRefreshSpeedMenu(); UpdateFlags(); this.ctrlHexViewer.HighlightCurrentRowColumn = config.HighlightCurrentRowColumn; this.ctrlHexViewer.TextZoom = config.TextZoom; this.ctrlHexViewer.BaseFont = new Font(config.FontFamily, config.FontSize, config.FontStyle); this.UpdateFadeOptions(); this.InitTblMappings(); this.ctrlHexViewer.StringViewVisible = mnuShowCharacters.Checked; UpdateImportButton(); InitMemoryTypeDropdown(true); _notifListener = new NotificationListener(); _notifListener.OnNotification += OnNotificationReceived; this.mnuShowCharacters.CheckedChanged += this.mnuShowCharacters_CheckedChanged; this.mnuIgnoreRedundantWrites.CheckedChanged += mnuIgnoreRedundantWrites_CheckedChanged; RestoreLocation(config.WindowLocation, config.WindowSize); this.InitShortcuts(); }
public ctrlConsoleStatus() { InitializeComponent(); ThemeHelper.FixMonoColors(contextGoTo); bool designMode = (LicenseManager.UsageMode == LicenseUsageMode.Designtime); if (!designMode) { tmrButton.Enabled = true; } if (Program.IsMono) { this.Font = new Font("Microsoft Sans Serif", 7.75F); } btnGoto.Image = BaseControl.DownArrow; _cpuBinder.Entity = new CPUState(); _ppuControlBinder.Entity = new PPUControlFlags(); _ppuStatusBinder.Entity = new PPUStatusFlags(); _cpuBinder.AddBinding("A", txtA); _cpuBinder.AddBinding("X", txtX); _cpuBinder.AddBinding("Y", txtY); _cpuBinder.AddBinding("PC", txtPC); _cpuBinder.AddBinding("SP", txtSP); _cpuBinder.AddBinding("PS", txtStatus); _cpuBinder.AddBinding("CycleCount", txtCycleCount, eNumberFormat.Decimal); _cpuBinder.AddBinding("NMIFlag", chkNMI); _ppuStatusBinder.AddBinding("VerticalBlank", chkVerticalBlank); _ppuStatusBinder.AddBinding("Sprite0Hit", chkSprite0Hit); _ppuStatusBinder.AddBinding("SpriteOverflow", chkSpriteOverflow); _ppuControlBinder.AddBinding("BackgroundEnabled", chkBGEnabled); _ppuControlBinder.AddBinding("SpritesEnabled", chkSpritesEnabled); _ppuControlBinder.AddBinding("BackgroundMask", chkDrawLeftBG); _ppuControlBinder.AddBinding("SpriteMask", chkDrawLeftSpr); _ppuControlBinder.AddBinding("VerticalWrite", chkVerticalWrite); _ppuControlBinder.AddBinding("VBlank", chkNMIOnBlank); _ppuControlBinder.AddBinding("LargeSprites", chkLargeSprites); _ppuControlBinder.AddBinding("Grayscale", chkGrayscale); _ppuControlBinder.AddBinding("IntensifyRed", chkIntensifyRed); _ppuControlBinder.AddBinding("IntensifyGreen", chkIntensifyGreen); _ppuControlBinder.AddBinding("IntensifyBlue", chkIntensifyBlue); _ppuControlBinder.AddBinding("BackgroundEnabled", chkBGEnabled); _ppuControlBinder.AddBinding("BackgroundEnabled", chkBGEnabled); _ppuControlBinder.AddBinding("BackgroundPatternAddr", txtBGAddr); _ppuControlBinder.AddBinding("SpritePatternAddr", txtSprAddr); }
public void Init() { _entityBinder.Entity = ConfigManager.Config.Debug.EventViewer; _entityBinder.AddBinding(nameof(EventViewerConfig.ApuRegisterReadColor), picApuReads); _entityBinder.AddBinding(nameof(EventViewerConfig.ApuRegisterWriteColor), picApuWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.CpuRegisterReadColor), picCpuReads); _entityBinder.AddBinding(nameof(EventViewerConfig.CpuRegisterWriteColor), picCpuWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.IrqColor), picIrq); _entityBinder.AddBinding(nameof(EventViewerConfig.BreakpointColor), picMarkedBreakpoints); _entityBinder.AddBinding(nameof(EventViewerConfig.NmiColor), picNmi); _entityBinder.AddBinding(nameof(EventViewerConfig.PpuRegisterReadColor), picPpuReads); _entityBinder.AddBinding(nameof(EventViewerConfig.PpuRegisterWriteVramColor), picPpuVramWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.PpuRegisterWriteCgramColor), picPpuCgramWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.PpuRegisterWriteOamColor), picPpuOamWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.PpuRegisterWriteMode7Color), picPpuMode7Writes); _entityBinder.AddBinding(nameof(EventViewerConfig.PpuRegisterWriteBgOptionColor), picPpuBgOptionWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.PpuRegisterWriteBgScrollColor), picPpuBgScrollWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.PpuRegisterWriteWindowColor), picPpuWindowWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.PpuRegisterWriteOtherColor), picPpuOtherWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.WorkRamRegisterReadColor), picWramReads); _entityBinder.AddBinding(nameof(EventViewerConfig.WorkRamRegisterWriteColor), picWramWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowApuRegisterReads), chkShowApuRegisterReads); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowApuRegisterWrites), chkShowApuRegisterWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowCpuRegisterReads), chkShowCpuRegisterReads); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowCpuRegisterWrites), chkShowCpuRegisterWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowIrq), chkShowIrq); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowMarkedBreakpoints), chkShowMarkedBreakpoints); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowNmi), chkShowNmi); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowPpuRegisterReads), chkShowPpuRegisterReads); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowPpuRegisterVramWrites), chkVramWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowPpuRegisterCgramWrites), chkCgramWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowPpuRegisterOamWrites), chkOamWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowPpuRegisterMode7Writes), chkMode7Writes); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowPpuRegisterBgOptionWrites), chkShowPpuBgOptionWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowPpuRegisterBgScrollWrites), chkBgScroll); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowPpuRegisterWindowWrites), chkWindowWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowPpuRegisterOtherWrites), chkOtherWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowWorkRamRegisterReads), chkShowWorkRamRegisterReads); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowWorkRamRegisterWrites), chkShowWorkRamRegisterWrites); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowDmaChannel0), chkDmaChannel0); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowDmaChannel1), chkDmaChannel1); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowDmaChannel2), chkDmaChannel2); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowDmaChannel3), chkDmaChannel3); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowDmaChannel4), chkDmaChannel4); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowDmaChannel5), chkDmaChannel5); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowDmaChannel6), chkDmaChannel6); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowDmaChannel7), chkDmaChannel7); _entityBinder.AddBinding(nameof(EventViewerConfig.ShowPreviousFrameEvents), chkShowPreviousFrameEvents); _entityBinder.UpdateUI(); }