Example #1
0
        private void SetOptions(bool disableLogging = false)
        {
            _entityBinder.UpdateObject();
            TraceLoggerOptions options = (TraceLoggerOptions)_entityBinder.Entity;

            _interopOptions                = new InteropTraceLoggerOptions();
            _interopOptions.LogCpu         = !disableLogging && options.LogCpu;
            _interopOptions.LogSpc         = !disableLogging && options.LogSpc;
            _interopOptions.LogNecDsp      = !disableLogging && options.LogNecDsp;
            _interopOptions.LogSa1         = !disableLogging && options.LogSa1;
            _interopOptions.LogGsu         = !disableLogging && options.LogGsu;
            _interopOptions.LogCx4         = !disableLogging && options.LogCx4;
            _interopOptions.IndentCode     = options.IndentCode;
            _interopOptions.ShowExtraInfo  = options.ShowExtraInfo;
            _interopOptions.UseLabels      = options.UseLabels;
            _interopOptions.UseWindowsEol  = options.UseWindowsEol;
            _interopOptions.ExtendZeroPage = options.ExtendZeroPage;

            _interopOptions.Condition = Encoding.UTF8.GetBytes(txtCondition.Text);
            Array.Resize(ref _interopOptions.Condition, 1000);

            _interopOptions.Format = Encoding.UTF8.GetBytes(txtFormat.Text.Replace("\t", "\\t"));
            Array.Resize(ref _interopOptions.Format, 1000);

            DebugApi.SetTraceOptions(_interopOptions);
        }
Example #2
0
        private InteropTraceLoggerOptions GetInteropOptions(bool disableLogging = false)
        {
            _entityBinder.UpdateObject();
            TraceLoggerOptions options = (TraceLoggerOptions)_entityBinder.Entity;

            CoprocessorType coproc = EmuApi.GetRomInfo().CoprocessorType;

            InteropTraceLoggerOptions interopOptions = new InteropTraceLoggerOptions();

            interopOptions.LogCpu         = !disableLogging && options.LogCpu && coproc != CoprocessorType.Gameboy;
            interopOptions.LogSpc         = !disableLogging && options.LogSpc && coproc != CoprocessorType.Gameboy;
            interopOptions.LogNecDsp      = !disableLogging && options.LogNecDsp;
            interopOptions.LogSa1         = !disableLogging && options.LogSa1;
            interopOptions.LogGsu         = !disableLogging && options.LogGsu;
            interopOptions.LogCx4         = !disableLogging && options.LogCx4;
            interopOptions.LogGameboy     = !disableLogging && options.LogGameboy;
            interopOptions.IndentCode     = options.IndentCode;
            interopOptions.ShowExtraInfo  = options.ShowExtraInfo;
            interopOptions.UseLabels      = options.UseLabels;
            interopOptions.UseWindowsEol  = options.UseWindowsEol;
            interopOptions.ExtendZeroPage = options.ExtendZeroPage;

            interopOptions.Condition = Encoding.UTF8.GetBytes(txtCondition.Text);
            Array.Resize(ref interopOptions.Condition, 1000);

            interopOptions.Format = Encoding.UTF8.GetBytes(txtFormat.Text.Replace("\t", "\\t"));
            Array.Resize(ref interopOptions.Format, 1000);

            return(interopOptions);
        }
Example #3
0
        private void SetOptions()
        {
            _entityBinder.Entity = ConfigManager.Config.DebugInfo.TraceLoggerOptions;
            _entityBinder.UpdateObject();
            TraceLoggerOptions options = (TraceLoggerOptions)_entityBinder.Entity;

            options.Condition = Encoding.UTF8.GetBytes(txtCondition.Text);
            Array.Resize(ref options.Condition, 1000);
            InteropEmu.DebugSetTraceOptions(options);
        }
        private void SetOptions()
        {
            _entityBinder.UpdateObject();
            TraceLoggerOptions options = (TraceLoggerOptions)_entityBinder.Entity;

            InteropTraceLoggerOptions interopOptions = new InteropTraceLoggerOptions();

            interopOptions.IndentCode     = options.IndentCode;
            interopOptions.ShowExtraInfo  = options.ShowExtraInfo;
            interopOptions.UseLabels      = options.UseLabels;
            interopOptions.UseWindowsEol  = options.UseWindowsEol;
            interopOptions.ExtendZeroPage = options.ExtendZeroPage;

            interopOptions.Condition = Encoding.UTF8.GetBytes(txtCondition.Text);
            Array.Resize(ref interopOptions.Condition, 1000);

            interopOptions.Format = Encoding.UTF8.GetBytes(txtFormat.Text.Replace("\t", "\\t"));
            Array.Resize(ref interopOptions.Format, 1000);

            InteropEmu.DebugSetTraceOptions(interopOptions);
        }
Example #5
0
        private void btnStartLogging_Click(object sender, EventArgs e)
        {
            TraceLoggerOptions options = new TraceLoggerOptions()
            {
                ShowByteCode    = chkShowByteCode.Checked,
                ShowCpuCycles   = chkShowCpuCycles.Checked,
                ShowExtraInfo   = chkShowExtraInfo.Checked,
                ShowPpuCycles   = chkShowPpuCycles.Checked,
                ShowPpuFrames   = chkShowFrameCount.Checked,
                ShowPpuScanline = chkShowPpuScanline.Checked,
                ShowRegisters   = chkShowRegisters.Checked,
                IndentCode      = chkIndentCode.Checked
            };

            InteropEmu.DebugStartTraceLogger(options);

            btnStartLogging.Enabled = false;
            btnStopLogging.Enabled  = true;
            btnOpenTrace.Enabled    = true;

            _loggingEnabled = true;
        }