Start an Atari 2600 debugger dialog
This commit is contained in:
parent
8cb571ada8
commit
1669fd7755
|
@ -504,6 +504,12 @@
|
||||||
<DependentUpon>RomStatusPicker.cs</DependentUpon>
|
<DependentUpon>RomStatusPicker.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Throttle.cs" />
|
<Compile Include="Throttle.cs" />
|
||||||
|
<Compile Include="tools\Atari2600\Atari2600Debugger.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="tools\Atari2600\Atari2600Debugger.Designer.cs">
|
||||||
|
<DependentUpon>Atari2600Debugger.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="tools\BatchRun.cs">
|
<Compile Include="tools\BatchRun.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -1061,6 +1067,9 @@
|
||||||
<EmbeddedResource Include="RomStatusPicker.resx">
|
<EmbeddedResource Include="RomStatusPicker.resx">
|
||||||
<DependentUpon>RomStatusPicker.cs</DependentUpon>
|
<DependentUpon>RomStatusPicker.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="tools\Atari2600\Atari2600Debugger.resx">
|
||||||
|
<DependentUpon>Atari2600Debugger.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="tools\BatchRun.resx">
|
<EmbeddedResource Include="tools\BatchRun.resx">
|
||||||
<DependentUpon>BatchRun.cs</DependentUpon>
|
<DependentUpon>BatchRun.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|
|
@ -358,6 +358,8 @@
|
||||||
this.ClearSRAMContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.ClearSRAMContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
|
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.Atari2600DebuggerMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripSeparator31 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.MainformMenu.SuspendLayout();
|
this.MainformMenu.SuspendLayout();
|
||||||
this.MainStatusBar.SuspendLayout();
|
this.MainStatusBar.SuspendLayout();
|
||||||
this.MainFormContextMenu.SuspendLayout();
|
this.MainFormContextMenu.SuspendLayout();
|
||||||
|
@ -2297,6 +2299,8 @@
|
||||||
// AtariSubMenu
|
// AtariSubMenu
|
||||||
//
|
//
|
||||||
this.AtariSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.AtariSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.Atari2600DebuggerMenuItem,
|
||||||
|
this.toolStripSeparator31,
|
||||||
this.AtariSettingsToolStripMenuItem});
|
this.AtariSettingsToolStripMenuItem});
|
||||||
this.AtariSubMenu.Name = "AtariSubMenu";
|
this.AtariSubMenu.Name = "AtariSubMenu";
|
||||||
this.AtariSubMenu.Size = new System.Drawing.Size(44, 19);
|
this.AtariSubMenu.Size = new System.Drawing.Size(44, 19);
|
||||||
|
@ -2305,7 +2309,7 @@
|
||||||
// AtariSettingsToolStripMenuItem
|
// AtariSettingsToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.AtariSettingsToolStripMenuItem.Name = "AtariSettingsToolStripMenuItem";
|
this.AtariSettingsToolStripMenuItem.Name = "AtariSettingsToolStripMenuItem";
|
||||||
this.AtariSettingsToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
|
this.AtariSettingsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||||
this.AtariSettingsToolStripMenuItem.Text = "Settings...";
|
this.AtariSettingsToolStripMenuItem.Text = "Settings...";
|
||||||
this.AtariSettingsToolStripMenuItem.Click += new System.EventHandler(this.AtariSettingsToolStripMenuItem_Click);
|
this.AtariSettingsToolStripMenuItem.Click += new System.EventHandler(this.AtariSettingsToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -3126,6 +3130,19 @@
|
||||||
this.ShowMenuContextMenuItem.Text = "Show Menu";
|
this.ShowMenuContextMenuItem.Text = "Show Menu";
|
||||||
this.ShowMenuContextMenuItem.Click += new System.EventHandler(this.ShowMenuContextMenuItem_Click);
|
this.ShowMenuContextMenuItem.Click += new System.EventHandler(this.ShowMenuContextMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
// Atari2600DebuggerMenuItem
|
||||||
|
//
|
||||||
|
this.Atari2600DebuggerMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Bug;
|
||||||
|
this.Atari2600DebuggerMenuItem.Name = "Atari2600DebuggerMenuItem";
|
||||||
|
this.Atari2600DebuggerMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||||
|
this.Atari2600DebuggerMenuItem.Text = "Debugger";
|
||||||
|
this.Atari2600DebuggerMenuItem.Click += new System.EventHandler(this.Atari2600DebuggerMenuItem_Click);
|
||||||
|
//
|
||||||
|
// toolStripSeparator31
|
||||||
|
//
|
||||||
|
this.toolStripSeparator31.Name = "toolStripSeparator31";
|
||||||
|
this.toolStripSeparator31.Size = new System.Drawing.Size(149, 6);
|
||||||
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
|
||||||
|
@ -3495,6 +3512,8 @@
|
||||||
private System.Windows.Forms.ToolStripMenuItem SMSdisplayAutoToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem SMSdisplayAutoToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator26;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator26;
|
||||||
private System.Windows.Forms.ToolStripMenuItem extensionsToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem extensionsToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem Atari2600DebuggerMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator31;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3182,5 +3182,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
new FileExtensionPreferences().ShowDialog();
|
new FileExtensionPreferences().ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Atari2600DebuggerMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
new Atari2600Debugger().Show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,537 @@
|
||||||
|
namespace BizHawk.Client.EmuHawk
|
||||||
|
{
|
||||||
|
partial class Atari2600Debugger
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Atari2600Debugger));
|
||||||
|
this.DebuggerMenu = new System.Windows.Forms.MenuStrip();
|
||||||
|
this.FileSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.StepBtn = new System.Windows.Forms.Button();
|
||||||
|
this.ScanlineAdvanceBtn = new System.Windows.Forms.Button();
|
||||||
|
this.FrameAdvButton = new System.Windows.Forms.Button();
|
||||||
|
this.RegistersBox = new System.Windows.Forms.GroupBox();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.PCRegisterBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.SPRegisterBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.ARegisterBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.XRegisterBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.YRegisterBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.SPRegisterBinaryBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.ARegisterBinaryBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.XRegisterBinaryBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.YRegisterBinaryBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.YRegisterHexBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.XRegisterHexBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.ARegisterHexBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.SPRegisterHexBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.NFlagCheckbox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.label6 = new System.Windows.Forms.Label();
|
||||||
|
this.VFlagCheckbox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.BFlagCheckbox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.TFlagCheckbox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.CFlagCheckbox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.ZFlagCheckbox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.IFlagCheckbox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.DFlagCheckbox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.CoreInfoBox = new System.Windows.Forms.GroupBox();
|
||||||
|
this.label7 = new System.Windows.Forms.Label();
|
||||||
|
this.FrameCountBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.ScanlineBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.label8 = new System.Windows.Forms.Label();
|
||||||
|
this.DebuggerMenu.SuspendLayout();
|
||||||
|
this.RegistersBox.SuspendLayout();
|
||||||
|
this.CoreInfoBox.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// DebuggerMenu
|
||||||
|
//
|
||||||
|
this.DebuggerMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.FileSubMenu});
|
||||||
|
this.DebuggerMenu.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.DebuggerMenu.Name = "DebuggerMenu";
|
||||||
|
this.DebuggerMenu.Size = new System.Drawing.Size(534, 24);
|
||||||
|
this.DebuggerMenu.TabIndex = 0;
|
||||||
|
this.DebuggerMenu.Text = "menuStrip1";
|
||||||
|
//
|
||||||
|
// FileSubMenu
|
||||||
|
//
|
||||||
|
this.FileSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.ExitMenuItem});
|
||||||
|
this.FileSubMenu.Name = "FileSubMenu";
|
||||||
|
this.FileSubMenu.Size = new System.Drawing.Size(37, 20);
|
||||||
|
this.FileSubMenu.Text = "&File";
|
||||||
|
//
|
||||||
|
// ExitMenuItem
|
||||||
|
//
|
||||||
|
this.ExitMenuItem.Name = "ExitMenuItem";
|
||||||
|
this.ExitMenuItem.ShortcutKeyDisplayString = "Alt+F4";
|
||||||
|
this.ExitMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||||
|
this.ExitMenuItem.Text = "&Close";
|
||||||
|
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
|
||||||
|
//
|
||||||
|
// StepBtn
|
||||||
|
//
|
||||||
|
this.StepBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.StepBtn.Location = new System.Drawing.Point(447, 27);
|
||||||
|
this.StepBtn.Name = "StepBtn";
|
||||||
|
this.StepBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.StepBtn.TabIndex = 1;
|
||||||
|
this.StepBtn.Text = "&Step";
|
||||||
|
this.StepBtn.UseVisualStyleBackColor = true;
|
||||||
|
this.StepBtn.Click += new System.EventHandler(this.StepBtn_Click);
|
||||||
|
//
|
||||||
|
// ScanlineAdvanceBtn
|
||||||
|
//
|
||||||
|
this.ScanlineAdvanceBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ScanlineAdvanceBtn.Location = new System.Drawing.Point(447, 56);
|
||||||
|
this.ScanlineAdvanceBtn.Name = "ScanlineAdvanceBtn";
|
||||||
|
this.ScanlineAdvanceBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.ScanlineAdvanceBtn.TabIndex = 2;
|
||||||
|
this.ScanlineAdvanceBtn.Text = "&Scan +1";
|
||||||
|
this.ScanlineAdvanceBtn.UseVisualStyleBackColor = true;
|
||||||
|
this.ScanlineAdvanceBtn.Click += new System.EventHandler(this.ScanlineAdvanceBtn_Click);
|
||||||
|
//
|
||||||
|
// FrameAdvButton
|
||||||
|
//
|
||||||
|
this.FrameAdvButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.FrameAdvButton.Location = new System.Drawing.Point(447, 85);
|
||||||
|
this.FrameAdvButton.Name = "FrameAdvButton";
|
||||||
|
this.FrameAdvButton.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.FrameAdvButton.TabIndex = 3;
|
||||||
|
this.FrameAdvButton.Text = "&Frame";
|
||||||
|
this.FrameAdvButton.UseVisualStyleBackColor = true;
|
||||||
|
this.FrameAdvButton.Click += new System.EventHandler(this.FrameAdvButton_Click);
|
||||||
|
//
|
||||||
|
// RegistersBox
|
||||||
|
//
|
||||||
|
this.RegistersBox.Controls.Add(this.CFlagCheckbox);
|
||||||
|
this.RegistersBox.Controls.Add(this.ZFlagCheckbox);
|
||||||
|
this.RegistersBox.Controls.Add(this.IFlagCheckbox);
|
||||||
|
this.RegistersBox.Controls.Add(this.DFlagCheckbox);
|
||||||
|
this.RegistersBox.Controls.Add(this.BFlagCheckbox);
|
||||||
|
this.RegistersBox.Controls.Add(this.TFlagCheckbox);
|
||||||
|
this.RegistersBox.Controls.Add(this.VFlagCheckbox);
|
||||||
|
this.RegistersBox.Controls.Add(this.label6);
|
||||||
|
this.RegistersBox.Controls.Add(this.NFlagCheckbox);
|
||||||
|
this.RegistersBox.Controls.Add(this.YRegisterHexBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.XRegisterHexBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.ARegisterHexBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.SPRegisterHexBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.YRegisterBinaryBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.XRegisterBinaryBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.ARegisterBinaryBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.SPRegisterBinaryBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.YRegisterBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.XRegisterBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.ARegisterBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.SPRegisterBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.PCRegisterBox);
|
||||||
|
this.RegistersBox.Controls.Add(this.label5);
|
||||||
|
this.RegistersBox.Controls.Add(this.label4);
|
||||||
|
this.RegistersBox.Controls.Add(this.label3);
|
||||||
|
this.RegistersBox.Controls.Add(this.label2);
|
||||||
|
this.RegistersBox.Controls.Add(this.label1);
|
||||||
|
this.RegistersBox.Location = new System.Drawing.Point(12, 27);
|
||||||
|
this.RegistersBox.Name = "RegistersBox";
|
||||||
|
this.RegistersBox.Size = new System.Drawing.Size(242, 155);
|
||||||
|
this.RegistersBox.TabIndex = 4;
|
||||||
|
this.RegistersBox.TabStop = false;
|
||||||
|
this.RegistersBox.Text = "Registers";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(24, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "PC:";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(6, 40);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(24, 13);
|
||||||
|
this.label2.TabIndex = 1;
|
||||||
|
this.label2.Text = "SP:";
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(6, 60);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(17, 13);
|
||||||
|
this.label3.TabIndex = 2;
|
||||||
|
this.label3.Text = "A:";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(6, 80);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(17, 13);
|
||||||
|
this.label4.TabIndex = 3;
|
||||||
|
this.label4.Text = "X:";
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.AutoSize = true;
|
||||||
|
this.label5.Location = new System.Drawing.Point(6, 100);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(17, 13);
|
||||||
|
this.label5.TabIndex = 4;
|
||||||
|
this.label5.Text = "Y:";
|
||||||
|
//
|
||||||
|
// PCRegisterBox
|
||||||
|
//
|
||||||
|
this.PCRegisterBox.Location = new System.Drawing.Point(36, 16);
|
||||||
|
this.PCRegisterBox.Name = "PCRegisterBox";
|
||||||
|
this.PCRegisterBox.ReadOnly = true;
|
||||||
|
this.PCRegisterBox.Size = new System.Drawing.Size(72, 20);
|
||||||
|
this.PCRegisterBox.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// SPRegisterBox
|
||||||
|
//
|
||||||
|
this.SPRegisterBox.Location = new System.Drawing.Point(36, 37);
|
||||||
|
this.SPRegisterBox.Name = "SPRegisterBox";
|
||||||
|
this.SPRegisterBox.ReadOnly = true;
|
||||||
|
this.SPRegisterBox.Size = new System.Drawing.Size(32, 20);
|
||||||
|
this.SPRegisterBox.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// ARegisterBox
|
||||||
|
//
|
||||||
|
this.ARegisterBox.Location = new System.Drawing.Point(36, 57);
|
||||||
|
this.ARegisterBox.Name = "ARegisterBox";
|
||||||
|
this.ARegisterBox.ReadOnly = true;
|
||||||
|
this.ARegisterBox.Size = new System.Drawing.Size(32, 20);
|
||||||
|
this.ARegisterBox.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// XRegisterBox
|
||||||
|
//
|
||||||
|
this.XRegisterBox.Location = new System.Drawing.Point(36, 77);
|
||||||
|
this.XRegisterBox.Name = "XRegisterBox";
|
||||||
|
this.XRegisterBox.ReadOnly = true;
|
||||||
|
this.XRegisterBox.Size = new System.Drawing.Size(32, 20);
|
||||||
|
this.XRegisterBox.TabIndex = 8;
|
||||||
|
//
|
||||||
|
// YRegisterBox
|
||||||
|
//
|
||||||
|
this.YRegisterBox.Location = new System.Drawing.Point(36, 97);
|
||||||
|
this.YRegisterBox.Name = "YRegisterBox";
|
||||||
|
this.YRegisterBox.ReadOnly = true;
|
||||||
|
this.YRegisterBox.Size = new System.Drawing.Size(32, 20);
|
||||||
|
this.YRegisterBox.TabIndex = 9;
|
||||||
|
//
|
||||||
|
// SPRegisterBinaryBox
|
||||||
|
//
|
||||||
|
this.SPRegisterBinaryBox.Location = new System.Drawing.Point(121, 37);
|
||||||
|
this.SPRegisterBinaryBox.Name = "SPRegisterBinaryBox";
|
||||||
|
this.SPRegisterBinaryBox.ReadOnly = true;
|
||||||
|
this.SPRegisterBinaryBox.Size = new System.Drawing.Size(62, 20);
|
||||||
|
this.SPRegisterBinaryBox.TabIndex = 10;
|
||||||
|
this.SPRegisterBinaryBox.Text = "0000 0000";
|
||||||
|
//
|
||||||
|
// ARegisterBinaryBox
|
||||||
|
//
|
||||||
|
this.ARegisterBinaryBox.Location = new System.Drawing.Point(121, 57);
|
||||||
|
this.ARegisterBinaryBox.Name = "ARegisterBinaryBox";
|
||||||
|
this.ARegisterBinaryBox.ReadOnly = true;
|
||||||
|
this.ARegisterBinaryBox.Size = new System.Drawing.Size(62, 20);
|
||||||
|
this.ARegisterBinaryBox.TabIndex = 11;
|
||||||
|
this.ARegisterBinaryBox.Text = "0000 0000";
|
||||||
|
//
|
||||||
|
// XRegisterBinaryBox
|
||||||
|
//
|
||||||
|
this.XRegisterBinaryBox.Location = new System.Drawing.Point(121, 77);
|
||||||
|
this.XRegisterBinaryBox.Name = "XRegisterBinaryBox";
|
||||||
|
this.XRegisterBinaryBox.ReadOnly = true;
|
||||||
|
this.XRegisterBinaryBox.Size = new System.Drawing.Size(62, 20);
|
||||||
|
this.XRegisterBinaryBox.TabIndex = 12;
|
||||||
|
this.XRegisterBinaryBox.Text = "0000 0000";
|
||||||
|
//
|
||||||
|
// YRegisterBinaryBox
|
||||||
|
//
|
||||||
|
this.YRegisterBinaryBox.Location = new System.Drawing.Point(121, 97);
|
||||||
|
this.YRegisterBinaryBox.Name = "YRegisterBinaryBox";
|
||||||
|
this.YRegisterBinaryBox.ReadOnly = true;
|
||||||
|
this.YRegisterBinaryBox.Size = new System.Drawing.Size(62, 20);
|
||||||
|
this.YRegisterBinaryBox.TabIndex = 13;
|
||||||
|
this.YRegisterBinaryBox.Text = "0000 0000";
|
||||||
|
//
|
||||||
|
// YRegisterHexBox
|
||||||
|
//
|
||||||
|
this.YRegisterHexBox.Location = new System.Drawing.Point(86, 97);
|
||||||
|
this.YRegisterHexBox.Name = "YRegisterHexBox";
|
||||||
|
this.YRegisterHexBox.ReadOnly = true;
|
||||||
|
this.YRegisterHexBox.Size = new System.Drawing.Size(32, 20);
|
||||||
|
this.YRegisterHexBox.TabIndex = 17;
|
||||||
|
//
|
||||||
|
// XRegisterHexBox
|
||||||
|
//
|
||||||
|
this.XRegisterHexBox.Location = new System.Drawing.Point(86, 77);
|
||||||
|
this.XRegisterHexBox.Name = "XRegisterHexBox";
|
||||||
|
this.XRegisterHexBox.ReadOnly = true;
|
||||||
|
this.XRegisterHexBox.Size = new System.Drawing.Size(32, 20);
|
||||||
|
this.XRegisterHexBox.TabIndex = 16;
|
||||||
|
//
|
||||||
|
// ARegisterHexBox
|
||||||
|
//
|
||||||
|
this.ARegisterHexBox.Location = new System.Drawing.Point(86, 57);
|
||||||
|
this.ARegisterHexBox.Name = "ARegisterHexBox";
|
||||||
|
this.ARegisterHexBox.ReadOnly = true;
|
||||||
|
this.ARegisterHexBox.Size = new System.Drawing.Size(32, 20);
|
||||||
|
this.ARegisterHexBox.TabIndex = 15;
|
||||||
|
//
|
||||||
|
// SPRegisterHexBox
|
||||||
|
//
|
||||||
|
this.SPRegisterHexBox.Location = new System.Drawing.Point(86, 37);
|
||||||
|
this.SPRegisterHexBox.Name = "SPRegisterHexBox";
|
||||||
|
this.SPRegisterHexBox.ReadOnly = true;
|
||||||
|
this.SPRegisterHexBox.Size = new System.Drawing.Size(32, 20);
|
||||||
|
this.SPRegisterHexBox.TabIndex = 14;
|
||||||
|
//
|
||||||
|
// NFlagCheckbox
|
||||||
|
//
|
||||||
|
this.NFlagCheckbox.Appearance = System.Windows.Forms.Appearance.Button;
|
||||||
|
this.NFlagCheckbox.AutoSize = true;
|
||||||
|
this.NFlagCheckbox.Location = new System.Drawing.Point(48, 121);
|
||||||
|
this.NFlagCheckbox.Name = "NFlagCheckbox";
|
||||||
|
this.NFlagCheckbox.Size = new System.Drawing.Size(25, 23);
|
||||||
|
this.NFlagCheckbox.TabIndex = 18;
|
||||||
|
this.NFlagCheckbox.Text = "N";
|
||||||
|
this.NFlagCheckbox.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
this.label6.AutoSize = true;
|
||||||
|
this.label6.Location = new System.Drawing.Point(7, 126);
|
||||||
|
this.label6.Name = "label6";
|
||||||
|
this.label6.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.label6.TabIndex = 19;
|
||||||
|
this.label6.Text = "Flags:";
|
||||||
|
//
|
||||||
|
// VFlagCheckbox
|
||||||
|
//
|
||||||
|
this.VFlagCheckbox.Appearance = System.Windows.Forms.Appearance.Button;
|
||||||
|
this.VFlagCheckbox.AutoSize = true;
|
||||||
|
this.VFlagCheckbox.Location = new System.Drawing.Point(72, 121);
|
||||||
|
this.VFlagCheckbox.Name = "VFlagCheckbox";
|
||||||
|
this.VFlagCheckbox.Size = new System.Drawing.Size(24, 23);
|
||||||
|
this.VFlagCheckbox.TabIndex = 20;
|
||||||
|
this.VFlagCheckbox.Text = "V";
|
||||||
|
this.VFlagCheckbox.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// BFlagCheckbox
|
||||||
|
//
|
||||||
|
this.BFlagCheckbox.Appearance = System.Windows.Forms.Appearance.Button;
|
||||||
|
this.BFlagCheckbox.AutoSize = true;
|
||||||
|
this.BFlagCheckbox.Location = new System.Drawing.Point(118, 121);
|
||||||
|
this.BFlagCheckbox.Name = "BFlagCheckbox";
|
||||||
|
this.BFlagCheckbox.Size = new System.Drawing.Size(24, 23);
|
||||||
|
this.BFlagCheckbox.TabIndex = 22;
|
||||||
|
this.BFlagCheckbox.Text = "B";
|
||||||
|
this.BFlagCheckbox.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// TFlagCheckbox
|
||||||
|
//
|
||||||
|
this.TFlagCheckbox.Appearance = System.Windows.Forms.Appearance.Button;
|
||||||
|
this.TFlagCheckbox.AutoSize = true;
|
||||||
|
this.TFlagCheckbox.Location = new System.Drawing.Point(95, 121);
|
||||||
|
this.TFlagCheckbox.Name = "TFlagCheckbox";
|
||||||
|
this.TFlagCheckbox.Size = new System.Drawing.Size(24, 23);
|
||||||
|
this.TFlagCheckbox.TabIndex = 21;
|
||||||
|
this.TFlagCheckbox.Text = "T";
|
||||||
|
this.TFlagCheckbox.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// CFlagCheckbox
|
||||||
|
//
|
||||||
|
this.CFlagCheckbox.Appearance = System.Windows.Forms.Appearance.Button;
|
||||||
|
this.CFlagCheckbox.AutoSize = true;
|
||||||
|
this.CFlagCheckbox.Location = new System.Drawing.Point(209, 121);
|
||||||
|
this.CFlagCheckbox.Name = "CFlagCheckbox";
|
||||||
|
this.CFlagCheckbox.Size = new System.Drawing.Size(24, 23);
|
||||||
|
this.CFlagCheckbox.TabIndex = 26;
|
||||||
|
this.CFlagCheckbox.Text = "C";
|
||||||
|
this.CFlagCheckbox.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// ZFlagCheckbox
|
||||||
|
//
|
||||||
|
this.ZFlagCheckbox.Appearance = System.Windows.Forms.Appearance.Button;
|
||||||
|
this.ZFlagCheckbox.AutoSize = true;
|
||||||
|
this.ZFlagCheckbox.Location = new System.Drawing.Point(186, 121);
|
||||||
|
this.ZFlagCheckbox.Name = "ZFlagCheckbox";
|
||||||
|
this.ZFlagCheckbox.Size = new System.Drawing.Size(24, 23);
|
||||||
|
this.ZFlagCheckbox.TabIndex = 25;
|
||||||
|
this.ZFlagCheckbox.Text = "Z";
|
||||||
|
this.ZFlagCheckbox.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// IFlagCheckbox
|
||||||
|
//
|
||||||
|
this.IFlagCheckbox.Appearance = System.Windows.Forms.Appearance.Button;
|
||||||
|
this.IFlagCheckbox.AutoSize = true;
|
||||||
|
this.IFlagCheckbox.Location = new System.Drawing.Point(167, 121);
|
||||||
|
this.IFlagCheckbox.Name = "IFlagCheckbox";
|
||||||
|
this.IFlagCheckbox.Size = new System.Drawing.Size(20, 23);
|
||||||
|
this.IFlagCheckbox.TabIndex = 24;
|
||||||
|
this.IFlagCheckbox.Text = "I";
|
||||||
|
this.IFlagCheckbox.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// DFlagCheckbox
|
||||||
|
//
|
||||||
|
this.DFlagCheckbox.Appearance = System.Windows.Forms.Appearance.Button;
|
||||||
|
this.DFlagCheckbox.AutoSize = true;
|
||||||
|
this.DFlagCheckbox.Location = new System.Drawing.Point(143, 121);
|
||||||
|
this.DFlagCheckbox.Name = "DFlagCheckbox";
|
||||||
|
this.DFlagCheckbox.Size = new System.Drawing.Size(25, 23);
|
||||||
|
this.DFlagCheckbox.TabIndex = 23;
|
||||||
|
this.DFlagCheckbox.Text = "D";
|
||||||
|
this.DFlagCheckbox.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// CoreInfoBox
|
||||||
|
//
|
||||||
|
this.CoreInfoBox.Controls.Add(this.ScanlineBox);
|
||||||
|
this.CoreInfoBox.Controls.Add(this.label8);
|
||||||
|
this.CoreInfoBox.Controls.Add(this.FrameCountBox);
|
||||||
|
this.CoreInfoBox.Controls.Add(this.label7);
|
||||||
|
this.CoreInfoBox.Location = new System.Drawing.Point(260, 27);
|
||||||
|
this.CoreInfoBox.Name = "CoreInfoBox";
|
||||||
|
this.CoreInfoBox.Size = new System.Drawing.Size(160, 155);
|
||||||
|
this.CoreInfoBox.TabIndex = 5;
|
||||||
|
this.CoreInfoBox.TabStop = false;
|
||||||
|
//
|
||||||
|
// label7
|
||||||
|
//
|
||||||
|
this.label7.AutoSize = true;
|
||||||
|
this.label7.Location = new System.Drawing.Point(6, 16);
|
||||||
|
this.label7.Name = "label7";
|
||||||
|
this.label7.Size = new System.Drawing.Size(39, 13);
|
||||||
|
this.label7.TabIndex = 0;
|
||||||
|
this.label7.Text = "Frame:";
|
||||||
|
//
|
||||||
|
// FrameCountBox
|
||||||
|
//
|
||||||
|
this.FrameCountBox.Location = new System.Drawing.Point(58, 13);
|
||||||
|
this.FrameCountBox.Name = "FrameCountBox";
|
||||||
|
this.FrameCountBox.ReadOnly = true;
|
||||||
|
this.FrameCountBox.Size = new System.Drawing.Size(74, 20);
|
||||||
|
this.FrameCountBox.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// ScanlineBox
|
||||||
|
//
|
||||||
|
this.ScanlineBox.Location = new System.Drawing.Point(58, 37);
|
||||||
|
this.ScanlineBox.Name = "ScanlineBox";
|
||||||
|
this.ScanlineBox.ReadOnly = true;
|
||||||
|
this.ScanlineBox.Size = new System.Drawing.Size(74, 20);
|
||||||
|
this.ScanlineBox.TabIndex = 3;
|
||||||
|
this.ScanlineBox.Text = "Todo";
|
||||||
|
//
|
||||||
|
// label8
|
||||||
|
//
|
||||||
|
this.label8.AutoSize = true;
|
||||||
|
this.label8.Location = new System.Drawing.Point(6, 40);
|
||||||
|
this.label8.Name = "label8";
|
||||||
|
this.label8.Size = new System.Drawing.Size(51, 13);
|
||||||
|
this.label8.TabIndex = 2;
|
||||||
|
this.label8.Text = "Scanline:";
|
||||||
|
//
|
||||||
|
// Atari2600Debugger
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(534, 498);
|
||||||
|
this.Controls.Add(this.CoreInfoBox);
|
||||||
|
this.Controls.Add(this.RegistersBox);
|
||||||
|
this.Controls.Add(this.FrameAdvButton);
|
||||||
|
this.Controls.Add(this.ScanlineAdvanceBtn);
|
||||||
|
this.Controls.Add(this.StepBtn);
|
||||||
|
this.Controls.Add(this.DebuggerMenu);
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MainMenuStrip = this.DebuggerMenu;
|
||||||
|
this.Name = "Atari2600Debugger";
|
||||||
|
this.Text = " ";
|
||||||
|
this.Load += new System.EventHandler(this.Atari2600Debugger_Load);
|
||||||
|
this.DebuggerMenu.ResumeLayout(false);
|
||||||
|
this.DebuggerMenu.PerformLayout();
|
||||||
|
this.RegistersBox.ResumeLayout(false);
|
||||||
|
this.RegistersBox.PerformLayout();
|
||||||
|
this.CoreInfoBox.ResumeLayout(false);
|
||||||
|
this.CoreInfoBox.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.MenuStrip DebuggerMenu;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem FileSubMenu;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem ExitMenuItem;
|
||||||
|
private System.Windows.Forms.Button StepBtn;
|
||||||
|
private System.Windows.Forms.Button ScanlineAdvanceBtn;
|
||||||
|
private System.Windows.Forms.Button FrameAdvButton;
|
||||||
|
private System.Windows.Forms.GroupBox RegistersBox;
|
||||||
|
private System.Windows.Forms.TextBox YRegisterBox;
|
||||||
|
private System.Windows.Forms.TextBox XRegisterBox;
|
||||||
|
private System.Windows.Forms.TextBox ARegisterBox;
|
||||||
|
private System.Windows.Forms.TextBox SPRegisterBox;
|
||||||
|
private System.Windows.Forms.TextBox PCRegisterBox;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox SPRegisterBinaryBox;
|
||||||
|
private System.Windows.Forms.TextBox YRegisterBinaryBox;
|
||||||
|
private System.Windows.Forms.TextBox XRegisterBinaryBox;
|
||||||
|
private System.Windows.Forms.TextBox ARegisterBinaryBox;
|
||||||
|
private System.Windows.Forms.TextBox YRegisterHexBox;
|
||||||
|
private System.Windows.Forms.TextBox XRegisterHexBox;
|
||||||
|
private System.Windows.Forms.TextBox ARegisterHexBox;
|
||||||
|
private System.Windows.Forms.TextBox SPRegisterHexBox;
|
||||||
|
private System.Windows.Forms.CheckBox CFlagCheckbox;
|
||||||
|
private System.Windows.Forms.CheckBox ZFlagCheckbox;
|
||||||
|
private System.Windows.Forms.CheckBox IFlagCheckbox;
|
||||||
|
private System.Windows.Forms.CheckBox DFlagCheckbox;
|
||||||
|
private System.Windows.Forms.CheckBox BFlagCheckbox;
|
||||||
|
private System.Windows.Forms.CheckBox TFlagCheckbox;
|
||||||
|
private System.Windows.Forms.CheckBox VFlagCheckbox;
|
||||||
|
private System.Windows.Forms.Label label6;
|
||||||
|
private System.Windows.Forms.CheckBox NFlagCheckbox;
|
||||||
|
private System.Windows.Forms.GroupBox CoreInfoBox;
|
||||||
|
private System.Windows.Forms.TextBox FrameCountBox;
|
||||||
|
private System.Windows.Forms.Label label7;
|
||||||
|
private System.Windows.Forms.TextBox ScanlineBox;
|
||||||
|
private System.Windows.Forms.Label label8;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,115 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
using BizHawk.Client.Common;
|
||||||
|
using BizHawk.Emulation.Cores.Atari.Atari2600;
|
||||||
|
|
||||||
|
namespace BizHawk.Client.EmuHawk
|
||||||
|
{
|
||||||
|
public partial class Atari2600Debugger : Form, IToolForm
|
||||||
|
{
|
||||||
|
private Atari2600 _core = Global.Emulator as Atari2600;
|
||||||
|
|
||||||
|
public Atari2600Debugger()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
//TODO: add to Closing a Mainform.ResumeControl() call
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Atari2600Debugger_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// TODO: some kind of method like PauseAndRelinquishControl() which will set a flag preventing unpausing by the user, and then a ResumeControl() method that is done on close
|
||||||
|
GlobalWin.MainForm.PauseEmulator();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Restart()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AskSave()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool UpdateBefore
|
||||||
|
{
|
||||||
|
get { return false; } // TODO: think about this
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateValues()
|
||||||
|
{
|
||||||
|
var flags = _core.GetCpuFlagsAndRegisters2();
|
||||||
|
PCRegisterBox.Text = flags["PC"].ToString();
|
||||||
|
|
||||||
|
SPRegisterBox.Text = flags["S"].ToString();
|
||||||
|
SPRegisterHexBox.Text = string.Format("{0:X2}", flags["S"]);
|
||||||
|
SPRegisterBinaryBox.Text = ToBinStr(flags["S"]);
|
||||||
|
|
||||||
|
ARegisterBox.Text = flags["A"].ToString();
|
||||||
|
ARegisterHexBox.Text = string.Format("{0:X2}", flags["A"]);
|
||||||
|
ARegisterBinaryBox.Text = ToBinStr(flags["A"]);
|
||||||
|
|
||||||
|
XRegisterBox.Text = flags["X"].ToString();
|
||||||
|
XRegisterHexBox.Text = string.Format("{0:X2}", flags["X"]);
|
||||||
|
XRegisterBinaryBox.Text = ToBinStr(flags["X"]);
|
||||||
|
|
||||||
|
YRegisterBox.Text = flags["Y"].ToString();
|
||||||
|
YRegisterHexBox.Text = string.Format("{0:X2}", flags["Y"]);
|
||||||
|
YRegisterBinaryBox.Text = ToBinStr(flags["Y"]);
|
||||||
|
|
||||||
|
NFlagCheckbox.Checked = flags["Flag N"] == 1;
|
||||||
|
VFlagCheckbox.Checked = flags["Flag V"] == 1;
|
||||||
|
TFlagCheckbox.Checked = flags["Flag T"] == 1;
|
||||||
|
BFlagCheckbox.Checked = flags["Flag B"] == 1;
|
||||||
|
|
||||||
|
DFlagCheckbox.Checked = flags["Flag D"] == 1;
|
||||||
|
IFlagCheckbox.Checked = flags["Flag I"] == 1;
|
||||||
|
ZFlagCheckbox.Checked = flags["Flag Z"] == 1;
|
||||||
|
CFlagCheckbox.Checked = flags["Flag C"] == 1;
|
||||||
|
|
||||||
|
FrameCountBox.Text = _core.Frame.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private string ToBinStr(int val)
|
||||||
|
{
|
||||||
|
return Convert.ToString((uint)val, 2).PadLeft(8, '0');
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Events
|
||||||
|
|
||||||
|
private void ExitMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void StepBtn_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_core.CycleAdvance();
|
||||||
|
UpdateValues();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ScanlineAdvanceBtn_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_core.ScanlineAdvance();
|
||||||
|
UpdateValues();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FrameAdvButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_core.FrameAdvance(true, true);
|
||||||
|
UpdateValues();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,148 @@
|
||||||
|
<?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="DebuggerMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAEpWMf/m5ub/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPUgo/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADJBI/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAEpWMf8AAAAAAAAAAAAAAAAyOSD/eWId/3hjHf95Yx3/eWId/wAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARU4t/wAAAAB5ZR//eWUg/4fJpv+Bx5//ecKV/yt8
|
||||||
|
Ov94ZB//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADlFKP8AAAAAeWch/5zSuP+Z0rX/kc6u/zyN
|
||||||
|
U/95w5b/emYi/wAAAAAAAAAASk4x/wAAAAAAAAAAAAAAAAAAAAAyPiP/emgk/67cxv+038v/rtvH/1in
|
||||||
|
c/+Rzq//gcef/3poJP8yOSD/PU4t/wAAAAAAAAAAAAAAAAAAAABFTjH/OUUo/3tqJ//C59X/zOvb/3/B
|
||||||
|
kv+u28b/mdK2/4fJpv96ayf/AAAAAAAAAAAAAAAAAAAAAFNWOP9TVjj/AAAAAAAAAAB7bSr/zOrb/9vz
|
||||||
|
5//M69v/tN/L/53SuP98bSr/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAr9zH/yJq
|
||||||
|
Lv/M69v/wubV/67cxv97byz/AAAAAAAAAAA9Ti3/SlYx/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANvz
|
||||||
|
5/+v28f/fHAt/3xwLf98cC3/8vLy/zI5IP85QSj/AAAAAAAAAAAAAAAAAAAAAEpWMf9KTjH/RU4t/z1I
|
||||||
|
KP98cC3/fHAt//Pz8/85RSj/8/Pz/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAPUgt/wAAAAAAAAAAAAAAAEVOMf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAEpOMf8AAAAAAAAAAAAAAABTVjj/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAABOVjj/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAA+f8AAP3/AAD9/wAA3B8AAOgPAADoDQAA4AMAAMAPAAAwHwAA8DMAAPAPAAAAfwAA938AAPd/
|
||||||
|
AAD3/////////w==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -306,18 +306,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
||||||
_tia.BeginAudioFrame();
|
_tia.BeginAudioFrame();
|
||||||
while (_tia.FrameComplete == false)
|
while (_tia.FrameComplete == false)
|
||||||
{
|
{
|
||||||
_tia.Execute(1);
|
CycleAdvance();
|
||||||
_tia.Execute(1);
|
|
||||||
_tia.Execute(1);
|
|
||||||
|
|
||||||
M6532.Timer.Tick();
|
|
||||||
if (CoreComm.Tracer.Enabled)
|
|
||||||
{
|
|
||||||
CoreComm.Tracer.Put(Cpu.TraceState());
|
|
||||||
}
|
|
||||||
|
|
||||||
Cpu.ExecuteOne();
|
|
||||||
_mapper.ClockCpu();
|
|
||||||
}
|
}
|
||||||
_tia.CompleteAudioFrame();
|
_tia.CompleteAudioFrame();
|
||||||
|
|
||||||
|
@ -334,6 +323,27 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void CycleAdvance()
|
||||||
|
{
|
||||||
|
_tia.Execute(1);
|
||||||
|
_tia.Execute(1);
|
||||||
|
_tia.Execute(1);
|
||||||
|
|
||||||
|
M6532.Timer.Tick();
|
||||||
|
if (CoreComm.Tracer.Enabled)
|
||||||
|
{
|
||||||
|
CoreComm.Tracer.Put(Cpu.TraceState());
|
||||||
|
}
|
||||||
|
|
||||||
|
Cpu.ExecuteOne();
|
||||||
|
_mapper.ClockCpu();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ScanlineAdvance()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
public byte ReadControls1(bool peek)
|
public byte ReadControls1(bool peek)
|
||||||
{
|
{
|
||||||
CoreComm.InputCallback.Call();
|
CoreComm.InputCallback.Call();
|
||||||
|
|
|
@ -164,6 +164,29 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: rewrite GetCpuFlagsAndRegisters this way
|
||||||
|
public Dictionary<string, int> GetCpuFlagsAndRegisters2()
|
||||||
|
{
|
||||||
|
return new Dictionary<string, int>
|
||||||
|
{
|
||||||
|
{ "A", Cpu.A },
|
||||||
|
{ "X", Cpu.X },
|
||||||
|
{ "Y", Cpu.Y },
|
||||||
|
{ "S", Cpu.S },
|
||||||
|
{ "PC", Cpu.PC },
|
||||||
|
|
||||||
|
{ "Flag C", Cpu.FlagC ? 1 : 0 },
|
||||||
|
{ "Flag Z", Cpu.FlagZ ? 1 : 0 },
|
||||||
|
{ "Flag I", Cpu.FlagI ? 1 : 0 },
|
||||||
|
{ "Flag D", Cpu.FlagD ? 1 : 0 },
|
||||||
|
|
||||||
|
{ "Flag B", Cpu.FlagB ? 1 : 0 },
|
||||||
|
{ "Flag V", Cpu.FlagV ? 1 : 0 },
|
||||||
|
{ "Flag N", Cpu.FlagN ? 1 : 0 },
|
||||||
|
{ "Flag T", Cpu.FlagT ? 1 : 0 }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public bool StartAsyncSound() { return true; }
|
public bool StartAsyncSound() { return true; }
|
||||||
|
|
||||||
public void EndAsyncSound() { }
|
public void EndAsyncSound() { }
|
||||||
|
|
Loading…
Reference in New Issue