Start a Trace Logger, currently only NES has the right hooks, but it crashes when used
This commit is contained in:
parent
b5b164caf3
commit
52b8161b39
|
@ -383,6 +383,12 @@
|
|||
<Compile Include="tools\LuaWriterColorConfig.Designer.cs">
|
||||
<DependentUpon>LuaWriterColorConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\TraceLogger.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\TraceLogger.Designer.cs">
|
||||
<DependentUpon>TraceLogger.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\VirtualPadGB.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
@ -723,6 +729,9 @@
|
|||
<DependentUpon>Cheats.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\TraceLogger.resx">
|
||||
<DependentUpon>TraceLogger.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\VirtualPad.resx">
|
||||
<DependentUpon>VirtualPad.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
|
|
@ -255,6 +255,7 @@
|
|||
this.EmuStatus = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.PlayRecordStatus = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.PauseStrip = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.RebootStatusBarIcon = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.AVIStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.StatusSlot1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
|
@ -268,7 +269,6 @@
|
|||
this.StatusSlot9 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.StatusSlot10 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.CheatStatus = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.RebootStatusBarIcon = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.cmiOpenRom = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmiLoadLastRom = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -289,6 +289,7 @@
|
|||
this.cmiScreenshotClipboard = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmiCloseRom = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmiShowMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.traceLoggerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.StatusSlot0.SuspendLayout();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
|
@ -1654,6 +1655,7 @@
|
|||
this.rAMSearchToolStripMenuItem,
|
||||
this.rAMPokeToolStripMenuItem,
|
||||
this.hexEditorToolStripMenuItem,
|
||||
this.traceLoggerToolStripMenuItem,
|
||||
this.tAStudioToolStripMenuItem,
|
||||
this.toolStripSeparator11,
|
||||
this.luaConsoleToolStripMenuItem,
|
||||
|
@ -1667,20 +1669,20 @@
|
|||
//
|
||||
this.toolBoxToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.ToolBox;
|
||||
this.toolBoxToolStripMenuItem.Name = "toolBoxToolStripMenuItem";
|
||||
this.toolBoxToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
||||
this.toolBoxToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.toolBoxToolStripMenuItem.Text = "&Tool Box";
|
||||
this.toolBoxToolStripMenuItem.Click += new System.EventHandler(this.toolBoxToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator12
|
||||
//
|
||||
this.toolStripSeparator12.Name = "toolStripSeparator12";
|
||||
this.toolStripSeparator12.Size = new System.Drawing.Size(136, 6);
|
||||
this.toolStripSeparator12.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// rAMWatchToolStripMenuItem
|
||||
//
|
||||
this.rAMWatchToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.FindHS;
|
||||
this.rAMWatchToolStripMenuItem.Name = "rAMWatchToolStripMenuItem";
|
||||
this.rAMWatchToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
||||
this.rAMWatchToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.rAMWatchToolStripMenuItem.Text = "RAM &Watch";
|
||||
this.rAMWatchToolStripMenuItem.Click += new System.EventHandler(this.RAMWatchToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -1688,7 +1690,7 @@
|
|||
//
|
||||
this.rAMSearchToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.search;
|
||||
this.rAMSearchToolStripMenuItem.Name = "rAMSearchToolStripMenuItem";
|
||||
this.rAMSearchToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
||||
this.rAMSearchToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.rAMSearchToolStripMenuItem.Text = "RAM &Search";
|
||||
this.rAMSearchToolStripMenuItem.Click += new System.EventHandler(this.rAMSearchToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -1696,7 +1698,7 @@
|
|||
//
|
||||
this.rAMPokeToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.poke;
|
||||
this.rAMPokeToolStripMenuItem.Name = "rAMPokeToolStripMenuItem";
|
||||
this.rAMPokeToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
||||
this.rAMPokeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.rAMPokeToolStripMenuItem.Text = "RAM &Poke";
|
||||
this.rAMPokeToolStripMenuItem.Click += new System.EventHandler(this.RAMPokeToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -1704,7 +1706,7 @@
|
|||
//
|
||||
this.hexEditorToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.poke;
|
||||
this.hexEditorToolStripMenuItem.Name = "hexEditorToolStripMenuItem";
|
||||
this.hexEditorToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
||||
this.hexEditorToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.hexEditorToolStripMenuItem.Text = "&Hex Editor";
|
||||
this.hexEditorToolStripMenuItem.Click += new System.EventHandler(this.hexEditorToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -1712,20 +1714,20 @@
|
|||
//
|
||||
this.tAStudioToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.TAStudio;
|
||||
this.tAStudioToolStripMenuItem.Name = "tAStudioToolStripMenuItem";
|
||||
this.tAStudioToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
||||
this.tAStudioToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.tAStudioToolStripMenuItem.Text = "&TAStudio";
|
||||
this.tAStudioToolStripMenuItem.Click += new System.EventHandler(this.tAStudioToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator11
|
||||
//
|
||||
this.toolStripSeparator11.Name = "toolStripSeparator11";
|
||||
this.toolStripSeparator11.Size = new System.Drawing.Size(136, 6);
|
||||
this.toolStripSeparator11.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// luaConsoleToolStripMenuItem
|
||||
//
|
||||
this.luaConsoleToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Lua;
|
||||
this.luaConsoleToolStripMenuItem.Name = "luaConsoleToolStripMenuItem";
|
||||
this.luaConsoleToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
||||
this.luaConsoleToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.luaConsoleToolStripMenuItem.Text = "Lua Console";
|
||||
this.luaConsoleToolStripMenuItem.Click += new System.EventHandler(this.luaConsoleToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -1733,7 +1735,7 @@
|
|||
//
|
||||
this.cheatsToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Freeze;
|
||||
this.cheatsToolStripMenuItem.Name = "cheatsToolStripMenuItem";
|
||||
this.cheatsToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
||||
this.cheatsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.cheatsToolStripMenuItem.Text = "Cheats";
|
||||
this.cheatsToolStripMenuItem.Click += new System.EventHandler(this.cheatsToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -2226,6 +2228,17 @@
|
|||
this.PauseStrip.ToolTipText = "Emulator is paused";
|
||||
this.PauseStrip.Click += new System.EventHandler(this.PauseStrip_Click);
|
||||
//
|
||||
// RebootStatusBarIcon
|
||||
//
|
||||
this.RebootStatusBarIcon.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.RebootStatusBarIcon.Image = global::BizHawk.MultiClient.Properties.Resources.reboot;
|
||||
this.RebootStatusBarIcon.Name = "RebootStatusBarIcon";
|
||||
this.RebootStatusBarIcon.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.RebootStatusBarIcon.Size = new System.Drawing.Size(16, 17);
|
||||
this.RebootStatusBarIcon.Text = "Reboot";
|
||||
this.RebootStatusBarIcon.ToolTipText = "A reboot of the core is needed for a setting change to take affect";
|
||||
this.RebootStatusBarIcon.Click += new System.EventHandler(this.toolStripStatusLabel2_Click);
|
||||
//
|
||||
// AVIStatusLabel
|
||||
//
|
||||
this.AVIStatusLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
|
@ -2317,17 +2330,6 @@
|
|||
this.CheatStatus.Size = new System.Drawing.Size(0, 17);
|
||||
this.CheatStatus.Click += new System.EventHandler(this.FreezeStatus_Click);
|
||||
//
|
||||
// RebootStatusBarIcon
|
||||
//
|
||||
this.RebootStatusBarIcon.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.RebootStatusBarIcon.Image = global::BizHawk.MultiClient.Properties.Resources.reboot;
|
||||
this.RebootStatusBarIcon.Name = "RebootStatusBarIcon";
|
||||
this.RebootStatusBarIcon.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.RebootStatusBarIcon.Size = new System.Drawing.Size(16, 17);
|
||||
this.RebootStatusBarIcon.Text = "Reboot";
|
||||
this.RebootStatusBarIcon.ToolTipText = "A reboot of the core is needed for a setting change to take affect";
|
||||
this.RebootStatusBarIcon.Click += new System.EventHandler(this.toolStripStatusLabel2_Click);
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
|
@ -2492,6 +2494,13 @@
|
|||
this.cmiShowMenu.Text = "Show Menu";
|
||||
this.cmiShowMenu.Click += new System.EventHandler(this.showMenuToolStripMenuItem_Click);
|
||||
//
|
||||
// traceLoggerToolStripMenuItem
|
||||
//
|
||||
this.traceLoggerToolStripMenuItem.Name = "traceLoggerToolStripMenuItem";
|
||||
this.traceLoggerToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.traceLoggerToolStripMenuItem.Text = "Trace &Logger";
|
||||
this.traceLoggerToolStripMenuItem.Click += new System.EventHandler(this.traceLoggerToolStripMenuItem_Click);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
|
||||
|
@ -2792,6 +2801,7 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem loadGBInSGBToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem backupSaveramToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripStatusLabel RebootStatusBarIcon;
|
||||
private System.Windows.Forms.ToolStripMenuItem traceLoggerToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -621,6 +621,15 @@ namespace BizHawk.MultiClient
|
|||
luaConsoleToolStripMenuItem.ShortcutKeyDisplayString = Global.Config.LuaConsole;
|
||||
cheatsToolStripMenuItem.ShortcutKeyDisplayString = Global.Config.Cheats;
|
||||
tAStudioToolStripMenuItem.ShortcutKeyDisplayString = Global.Config.TASTudio;
|
||||
|
||||
if (INTERIM)
|
||||
{
|
||||
traceLoggerToolStripMenuItem.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
traceLoggerToolStripMenuItem.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void saveSlotToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||
|
|
|
@ -70,6 +70,7 @@ namespace BizHawk.MultiClient
|
|||
public RamWatch RamWatch1 = new RamWatch();
|
||||
public RamSearch RamSearch1 = new RamSearch();
|
||||
public HexEditor HexEditor1 = new HexEditor();
|
||||
public TraceLogger TraceLogger1 = new TraceLogger();
|
||||
public SNESGraphicsDebugger SNESGraphicsDebugger1 = new SNESGraphicsDebugger();
|
||||
public NESNameTableViewer NESNameTableViewer1 = new NESNameTableViewer();
|
||||
public NESPPU NESPPU1 = new NESPPU();
|
||||
|
@ -2304,6 +2305,7 @@ namespace BizHawk.MultiClient
|
|||
LuaConsole1.LuaImp.FrameRegisterAfter();
|
||||
TAStudio1.UpdateValues();
|
||||
SNESGraphicsDebugger1.UpdateToolsAfter();
|
||||
TraceLogger1.UpdateValues();
|
||||
}
|
||||
|
||||
private unsafe Image MakeScreenshotImage()
|
||||
|
@ -2571,6 +2573,17 @@ namespace BizHawk.MultiClient
|
|||
HexEditor1.Focus();
|
||||
}
|
||||
|
||||
public void LoadTraceLogger()
|
||||
{
|
||||
if (!TraceLogger1.IsHandleCreated || TraceLogger1.IsDisposed)
|
||||
{
|
||||
TraceLogger1 = new TraceLogger();
|
||||
TraceLogger1.Show();
|
||||
}
|
||||
else
|
||||
TraceLogger1.Focus();
|
||||
}
|
||||
|
||||
public void LoadToolBox()
|
||||
{
|
||||
if (!ToolBox1.IsHandleCreated || ToolBox1.IsDisposed)
|
||||
|
@ -2888,6 +2901,7 @@ namespace BizHawk.MultiClient
|
|||
CloseForm(Cheats1);
|
||||
CloseForm(TI83KeyPad1);
|
||||
CloseForm(TAStudio1);
|
||||
CloseForm(TraceLogger1);
|
||||
#if WINDOWS
|
||||
CloseForm(LuaConsole1);
|
||||
#endif
|
||||
|
@ -3759,5 +3773,10 @@ namespace BizHawk.MultiClient
|
|||
SetRebootIconStatus();
|
||||
Global.OSD.AddMessage("Core reboot needed for this setting");
|
||||
}
|
||||
|
||||
private void traceLoggerToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadTraceLogger();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,204 @@
|
|||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class TraceLogger
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.TraceView = new BizHawk.VirtualListView();
|
||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveLogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.ClearButton = new System.Windows.Forms.Button();
|
||||
this.LoggingEnabled = new System.Windows.Forms.CheckBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// TraceView
|
||||
//
|
||||
this.TraceView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TraceView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader1});
|
||||
this.TraceView.FullRowSelect = true;
|
||||
this.TraceView.GridLines = true;
|
||||
this.TraceView.HideSelection = false;
|
||||
this.TraceView.ItemCount = 0;
|
||||
this.TraceView.Location = new System.Drawing.Point(9, 16);
|
||||
this.TraceView.Name = "TraceView";
|
||||
this.TraceView.selectedItem = -1;
|
||||
this.TraceView.Size = new System.Drawing.Size(320, 386);
|
||||
this.TraceView.TabIndex = 0;
|
||||
this.TraceView.UseCompatibleStateImageBehavior = false;
|
||||
this.TraceView.View = System.Windows.Forms.View.Details;
|
||||
this.TraceView.VirtualMode = true;
|
||||
//
|
||||
// columnHeader1
|
||||
//
|
||||
this.columnHeader1.Text = "Instructions";
|
||||
this.columnHeader1.Width = 316;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox1.Controls.Add(this.TraceView);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 27);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(337, 411);
|
||||
this.groupBox1.TabIndex = 1;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Trace log";
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripMenuItem1,
|
||||
this.fileToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(555, 24);
|
||||
this.menuStrip1.TabIndex = 2;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(12, 20);
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.saveLogToolStripMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// saveLogToolStripMenuItem
|
||||
//
|
||||
this.saveLogToolStripMenuItem.Enabled = false;
|
||||
this.saveLogToolStripMenuItem.Name = "saveLogToolStripMenuItem";
|
||||
this.saveLogToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
|
||||
this.saveLogToolStripMenuItem.Text = "&Save Log";
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(131, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.ShortcutKeyDisplayString = "Alt+F4";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox2.Controls.Add(this.ClearButton);
|
||||
this.groupBox2.Controls.Add(this.LoggingEnabled);
|
||||
this.groupBox2.Location = new System.Drawing.Point(356, 27);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(187, 411);
|
||||
this.groupBox2.TabIndex = 3;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Control";
|
||||
//
|
||||
// ClearButton
|
||||
//
|
||||
this.ClearButton.Location = new System.Drawing.Point(15, 73);
|
||||
this.ClearButton.Name = "ClearButton";
|
||||
this.ClearButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.ClearButton.TabIndex = 1;
|
||||
this.ClearButton.Text = "&Clear";
|
||||
this.ClearButton.UseVisualStyleBackColor = true;
|
||||
this.ClearButton.Click += new System.EventHandler(this.ClearButton_Click);
|
||||
//
|
||||
// LoggingEnabled
|
||||
//
|
||||
this.LoggingEnabled.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.LoggingEnabled.AutoSize = true;
|
||||
this.LoggingEnabled.Location = new System.Drawing.Point(15, 31);
|
||||
this.LoggingEnabled.Name = "LoggingEnabled";
|
||||
this.LoggingEnabled.Size = new System.Drawing.Size(97, 23);
|
||||
this.LoggingEnabled.TabIndex = 0;
|
||||
this.LoggingEnabled.Text = "&Logging Enabled";
|
||||
this.LoggingEnabled.UseVisualStyleBackColor = true;
|
||||
this.LoggingEnabled.CheckedChanged += new System.EventHandler(this.LoggingEnabled_CheckedChanged);
|
||||
//
|
||||
// TraceLogger
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(555, 450);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "TraceLogger";
|
||||
this.Text = "TraceLogger";
|
||||
this.Load += new System.EventHandler(this.TraceLogger_Load);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private VirtualListView TraceView;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveLogToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.CheckBox LoggingEnabled;
|
||||
private System.Windows.Forms.Button ClearButton;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class TraceLogger : Form
|
||||
{
|
||||
List<string> Instructions = new List<string>();
|
||||
|
||||
public TraceLogger()
|
||||
{
|
||||
InitializeComponent();
|
||||
TraceView.QueryItemText += new QueryItemTextHandler(TraceView_QueryItemText);
|
||||
TraceView.QueryItemBkColor += new QueryItemBkColorHandler(TraceView_QueryItemBkColor);
|
||||
TraceView.VirtualMode = true;
|
||||
Closing += (o, e) => SaveConfigSettings();
|
||||
}
|
||||
|
||||
public void SaveConfigSettings()
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
|
||||
private void TraceView_QueryItemBkColor(int index, int column, ref Color color)
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
|
||||
void TraceView_QueryItemText(int index, int column, out string text)
|
||||
{
|
||||
text = Instructions[index];
|
||||
}
|
||||
|
||||
private void TraceLogger_Load(object sender, EventArgs e)
|
||||
{
|
||||
ClearList();
|
||||
LoggingEnabled.Checked = true;
|
||||
//Global.CoreInputComm.CpuTraceEnable = true;
|
||||
}
|
||||
|
||||
public void UpdateValues()
|
||||
{
|
||||
DoInstructions();
|
||||
TraceView.Refresh();
|
||||
}
|
||||
|
||||
public void Restart()
|
||||
{
|
||||
if (!this.IsHandleCreated || this.IsDisposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ClearList();
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearList()
|
||||
{
|
||||
Instructions.Clear();
|
||||
TraceView.Clear();
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void LoggingEnabled_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Global.CoreInputComm.CpuTraceEnable = LoggingEnabled.Checked;
|
||||
}
|
||||
|
||||
private void ClearButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearList();
|
||||
}
|
||||
|
||||
private void DoInstructions()
|
||||
{
|
||||
//using (Global.CoreInputComm.CpuTraceStream)
|
||||
//{
|
||||
Instructions.Add("FART 0x15");
|
||||
TraceView.ItemCount = Instructions.Count;
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
Loading…
Reference in New Issue