Debugger: Added APU viewer tool

This commit is contained in:
Sour 2018-01-01 23:23:18 -05:00
parent 8ad553688a
commit 2118d498c7
44 changed files with 3440 additions and 45 deletions

View file

@ -221,7 +221,7 @@ public:
{
ApuFrameCounterState state;
state.IrqEnabled = !_inhibitIRQ;
state.SequencePosition = _currentStep;
state.SequencePosition = std::min<uint8_t>(_currentStep, _stepMode ? 5 : 4);
state.FiveStepMode = _stepMode == 1;
return state;
}

View file

@ -645,6 +645,17 @@ void Debugger::PrivateProcessVramWriteOperation(uint16_t addr, uint8_t &value)
ProcessPpuOperation(addr, value, MemoryOperationType::Write);
}
void Debugger::GetApuState(ApuState *state)
{
//Pause the emulation
DebugBreakHelper helper(this);
//Force APU to catch up before we retrieve its state
APU::StaticRun();
*state = _apu->GetState();
}
void Debugger::GetState(DebugState *state, bool includeMapperInfo)
{
state->Model = _console->GetModel();

View file

@ -155,6 +155,7 @@ public:
void GetCallstack(int32_t* callstackAbsolute, int32_t* callstackRelative);
void GetApuState(ApuState *state);
void GetState(DebugState *state, bool includeMapperInfo = true);
void SetState(DebugState state);

View file

@ -220,6 +220,7 @@ ApuDmcState DeltaModulationChannel::GetState()
state.Loop = _loopFlag;
state.OutputVolume = _lastOutput;
state.Period = _period;
state.Timer = _timer;
state.SampleRate = (double)CPU::GetClockRate(GetNesModel()) / (_period + 1);
state.SampleAddr = _sampleAddr;
state.SampleLength = _sampleLength;

View file

@ -457,6 +457,8 @@ enum class EmulatorShortcut
OpenMemoryTools,
OpenScriptWindow,
OpenTraceLogger,
OpenApuViewer,
ShortcutCount
};
struct KeyCombination

View file

@ -96,6 +96,7 @@ public:
state.ModeFlag = _modeFlag;
state.OutputVolume = _lastOutput;
state.Period = _period;
state.Timer = _timer;
state.ShiftRegister = _shiftRegister;
return state;
}

View file

@ -111,7 +111,7 @@ void ShortcutKeyHandler::CheckMappedKeys()
_keyboardMode = EmulationSettings::IsKeyboardMode();
//Let the UI handle these shortcuts
for(uint64_t i = (uint64_t)EmulatorShortcut::SwitchDiskSide; i <= (uint64_t)EmulatorShortcut::OpenTraceLogger; i++) {
for(uint64_t i = (uint64_t)EmulatorShortcut::SwitchDiskSide; i < (uint64_t)EmulatorShortcut::ShortcutCount; i++) {
if(DetectKeyPress((EmulatorShortcut)i)) {
void* param = (void*)i;
MessageManager::SendNotification(ConsoleNotificationType::ExecuteShortcut, param);

View file

@ -195,6 +195,7 @@ public:
state.LengthCounter = ApuLengthCounter::GetState();
state.OutputVolume = _lastOutput;
state.Period = _realPeriod;
state.Timer = _timer / 2;
state.SweepEnabled = _sweepEnabled;
state.SweepNegate = _sweepNegate;
state.SweepPeriod = _sweepPeriod;

View file

@ -109,6 +109,7 @@ public:
state.LengthCounter = ApuLengthCounter::GetState();
state.OutputVolume = _lastOutput;
state.Period = _period;
state.Timer = _timer;
state.SequencePosition = _sequencePosition;
return state;
}

View file

@ -161,6 +161,7 @@ struct ApuSquareState
uint8_t Duty;
uint8_t DutyPosition;
uint16_t Period;
uint16_t Timer;
bool SweepEnabled;
bool SweepNegate;
@ -178,6 +179,7 @@ struct ApuSquareState
struct ApuTriangleState
{
uint16_t Period;
uint16_t Timer;
uint8_t SequencePosition;
bool Enabled;
@ -190,6 +192,7 @@ struct ApuTriangleState
struct ApuNoiseState
{
uint16_t Period;
uint16_t Timer;
uint16_t ShiftRegister;
bool ModeFlag;
@ -210,6 +213,7 @@ struct ApuDmcState
bool Loop;
bool IrqEnabled;
uint16_t Period;
uint16_t Timer;
uint16_t BytesRemaining;
uint8_t OutputVolume;

View file

@ -126,6 +126,7 @@ namespace Mesen.GUI.Config
ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.OpenPpuViewer, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("Ctrl"), Key2 = InteropEmu.GetKeyCode("P") }));
ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.OpenScriptWindow, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("Ctrl"), Key2 = InteropEmu.GetKeyCode("J") }));
ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.OpenTraceLogger, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("Ctrl"), Key2 = InteropEmu.GetKeyCode("N") }));
ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.OpenApuViewer, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("Ctrl"), Key2 = InteropEmu.GetKeyCode("U") }));
ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.OpenFile, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("Ctrl"), Key2 = InteropEmu.GetKeyCode("O") }));

View file

@ -0,0 +1,311 @@
namespace Mesen.GUI.Debugger.Controls
{
partial class ctrlDmcInfo
{
/// <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 Component 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.chkIrqEnabled = new System.Windows.Forms.CheckBox();
this.chkLoop = new System.Windows.Forms.CheckBox();
this.chkEnabled = new System.Windows.Forms.CheckBox();
this.lblSampleAddr = new System.Windows.Forms.Label();
this.txtSampleAddress = new System.Windows.Forms.TextBox();
this.lblSampleLength = new System.Windows.Forms.Label();
this.lblBytesRemaining = new System.Windows.Forms.Label();
this.txtSampleLength = new System.Windows.Forms.TextBox();
this.txtBytesRemaining = new System.Windows.Forms.TextBox();
this.lblPeriod = new System.Windows.Forms.Label();
this.txtPeriod = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.txtOutputVolume = new System.Windows.Forms.TextBox();
this.lblHz = new System.Windows.Forms.Label();
this.txtSampleRate = new System.Windows.Forms.TextBox();
this.lblSampleRate = new System.Windows.Forms.Label();
this.lblTimer = new System.Windows.Forms.Label();
this.txtTimer = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 9;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.chkIrqEnabled, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.chkLoop, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.chkEnabled, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.lblSampleAddr, 5, 0);
this.tableLayoutPanel1.Controls.Add(this.txtSampleAddress, 8, 0);
this.tableLayoutPanel1.Controls.Add(this.lblSampleLength, 5, 1);
this.tableLayoutPanel1.Controls.Add(this.lblBytesRemaining, 5, 2);
this.tableLayoutPanel1.Controls.Add(this.txtSampleLength, 8, 1);
this.tableLayoutPanel1.Controls.Add(this.txtBytesRemaining, 8, 2);
this.tableLayoutPanel1.Controls.Add(this.lblPeriod, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.txtPeriod, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.label1, 2, 3);
this.tableLayoutPanel1.Controls.Add(this.txtOutputVolume, 3, 3);
this.tableLayoutPanel1.Controls.Add(this.lblHz, 4, 2);
this.tableLayoutPanel1.Controls.Add(this.txtSampleRate, 3, 2);
this.tableLayoutPanel1.Controls.Add(this.lblSampleRate, 2, 2);
this.tableLayoutPanel1.Controls.Add(this.lblTimer, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.txtTimer, 3, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 5;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(415, 105);
this.tableLayoutPanel1.TabIndex = 0;
//
// chkIrqEnabled
//
this.chkIrqEnabled.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkIrqEnabled.AutoCheck = false;
this.chkIrqEnabled.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkIrqEnabled, 2);
this.chkIrqEnabled.Location = new System.Drawing.Point(3, 56);
this.chkIrqEnabled.Name = "chkIrqEnabled";
this.chkIrqEnabled.Size = new System.Drawing.Size(87, 17);
this.chkIrqEnabled.TabIndex = 16;
this.chkIrqEnabled.Text = "IRQ Enabled";
this.chkIrqEnabled.UseVisualStyleBackColor = true;
//
// chkLoop
//
this.chkLoop.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkLoop.AutoCheck = false;
this.chkLoop.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkLoop, 2);
this.chkLoop.Location = new System.Drawing.Point(3, 30);
this.chkLoop.Name = "chkLoop";
this.chkLoop.Size = new System.Drawing.Size(50, 17);
this.chkLoop.TabIndex = 15;
this.chkLoop.Text = "Loop";
this.chkLoop.UseVisualStyleBackColor = true;
//
// chkEnabled
//
this.chkEnabled.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkEnabled.AutoCheck = false;
this.chkEnabled.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkEnabled, 2);
this.chkEnabled.Location = new System.Drawing.Point(3, 4);
this.chkEnabled.Name = "chkEnabled";
this.chkEnabled.Size = new System.Drawing.Size(65, 17);
this.chkEnabled.TabIndex = 3;
this.chkEnabled.Text = "Enabled";
this.chkEnabled.UseVisualStyleBackColor = true;
//
// lblSampleAddr
//
this.lblSampleAddr.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblSampleAddr.AutoSize = true;
this.lblSampleAddr.Location = new System.Drawing.Point(273, 6);
this.lblSampleAddr.Name = "lblSampleAddr";
this.lblSampleAddr.Size = new System.Drawing.Size(86, 13);
this.lblSampleAddr.TabIndex = 6;
this.lblSampleAddr.Text = "Sample Address:";
//
// txtSampleAddress
//
this.txtSampleAddress.BackColor = System.Drawing.Color.White;
this.txtSampleAddress.Location = new System.Drawing.Point(365, 3);
this.txtSampleAddress.Name = "txtSampleAddress";
this.txtSampleAddress.ReadOnly = true;
this.txtSampleAddress.Size = new System.Drawing.Size(39, 20);
this.txtSampleAddress.TabIndex = 9;
//
// lblSampleLength
//
this.lblSampleLength.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblSampleLength.AutoSize = true;
this.lblSampleLength.Location = new System.Drawing.Point(273, 32);
this.lblSampleLength.Name = "lblSampleLength";
this.lblSampleLength.Size = new System.Drawing.Size(81, 13);
this.lblSampleLength.TabIndex = 17;
this.lblSampleLength.Text = "Sample Length:";
//
// lblBytesRemaining
//
this.lblBytesRemaining.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblBytesRemaining.AutoSize = true;
this.lblBytesRemaining.Location = new System.Drawing.Point(273, 58);
this.lblBytesRemaining.Name = "lblBytesRemaining";
this.lblBytesRemaining.Size = new System.Drawing.Size(84, 13);
this.lblBytesRemaining.TabIndex = 18;
this.lblBytesRemaining.Text = "Bytes remaining:";
//
// txtSampleLength
//
this.txtSampleLength.BackColor = System.Drawing.Color.White;
this.txtSampleLength.Location = new System.Drawing.Point(365, 29);
this.txtSampleLength.Name = "txtSampleLength";
this.txtSampleLength.ReadOnly = true;
this.txtSampleLength.Size = new System.Drawing.Size(39, 20);
this.txtSampleLength.TabIndex = 19;
//
// txtBytesRemaining
//
this.txtBytesRemaining.BackColor = System.Drawing.Color.White;
this.txtBytesRemaining.Location = new System.Drawing.Point(365, 55);
this.txtBytesRemaining.Name = "txtBytesRemaining";
this.txtBytesRemaining.ReadOnly = true;
this.txtBytesRemaining.Size = new System.Drawing.Size(39, 20);
this.txtBytesRemaining.TabIndex = 20;
//
// lblPeriod
//
this.lblPeriod.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblPeriod.AutoSize = true;
this.lblPeriod.Location = new System.Drawing.Point(96, 6);
this.lblPeriod.Name = "lblPeriod";
this.lblPeriod.Size = new System.Drawing.Size(40, 13);
this.lblPeriod.TabIndex = 0;
this.lblPeriod.Text = "Period:";
//
// txtPeriod
//
this.txtPeriod.BackColor = System.Drawing.Color.White;
this.txtPeriod.Location = new System.Drawing.Point(182, 3);
this.txtPeriod.Name = "txtPeriod";
this.txtPeriod.ReadOnly = true;
this.txtPeriod.Size = new System.Drawing.Size(39, 20);
this.txtPeriod.TabIndex = 4;
//
// label1
//
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(96, 84);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 13);
this.label1.TabIndex = 7;
this.label1.Text = "Output Volume:";
//
// txtOutputVolume
//
this.txtOutputVolume.BackColor = System.Drawing.Color.White;
this.txtOutputVolume.Location = new System.Drawing.Point(182, 81);
this.txtOutputVolume.Name = "txtOutputVolume";
this.txtOutputVolume.ReadOnly = true;
this.txtOutputVolume.Size = new System.Drawing.Size(39, 20);
this.txtOutputVolume.TabIndex = 8;
//
// lblHz
//
this.lblHz.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblHz.AutoSize = true;
this.lblHz.Location = new System.Drawing.Point(247, 58);
this.lblHz.Name = "lblHz";
this.lblHz.Size = new System.Drawing.Size(20, 13);
this.lblHz.TabIndex = 14;
this.lblHz.Text = "Hz";
//
// txtSampleRate
//
this.txtSampleRate.BackColor = System.Drawing.Color.White;
this.txtSampleRate.Location = new System.Drawing.Point(182, 55);
this.txtSampleRate.Name = "txtSampleRate";
this.txtSampleRate.ReadOnly = true;
this.txtSampleRate.Size = new System.Drawing.Size(59, 20);
this.txtSampleRate.TabIndex = 5;
//
// lblSampleRate
//
this.lblSampleRate.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblSampleRate.AutoSize = true;
this.lblSampleRate.Location = new System.Drawing.Point(96, 58);
this.lblSampleRate.Name = "lblSampleRate";
this.lblSampleRate.Size = new System.Drawing.Size(71, 13);
this.lblSampleRate.TabIndex = 1;
this.lblSampleRate.Text = "Sample Rate:";
//
// lblTimer
//
this.lblTimer.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblTimer.AutoSize = true;
this.lblTimer.Location = new System.Drawing.Point(96, 32);
this.lblTimer.Name = "lblTimer";
this.lblTimer.Size = new System.Drawing.Size(36, 13);
this.lblTimer.TabIndex = 21;
this.lblTimer.Text = "Timer:";
//
// txtTimer
//
this.txtTimer.BackColor = System.Drawing.Color.White;
this.txtTimer.Location = new System.Drawing.Point(182, 29);
this.txtTimer.Name = "txtTimer";
this.txtTimer.ReadOnly = true;
this.txtTimer.Size = new System.Drawing.Size(39, 20);
this.txtTimer.TabIndex = 22;
//
// ctrlDmcInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "ctrlDmcInfo";
this.Size = new System.Drawing.Size(415, 105);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label lblPeriod;
private System.Windows.Forms.Label lblSampleRate;
private System.Windows.Forms.CheckBox chkEnabled;
private System.Windows.Forms.TextBox txtPeriod;
private System.Windows.Forms.TextBox txtSampleRate;
private System.Windows.Forms.Label lblSampleAddr;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtOutputVolume;
private System.Windows.Forms.TextBox txtSampleAddress;
private System.Windows.Forms.Label lblHz;
private System.Windows.Forms.CheckBox chkLoop;
private System.Windows.Forms.CheckBox chkIrqEnabled;
private System.Windows.Forms.Label lblSampleLength;
private System.Windows.Forms.Label lblBytesRemaining;
private System.Windows.Forms.TextBox txtSampleLength;
private System.Windows.Forms.TextBox txtBytesRemaining;
private System.Windows.Forms.Label lblTimer;
private System.Windows.Forms.TextBox txtTimer;
}
}

View file

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesen.GUI.Debugger.Controls
{
public partial class ctrlDmcInfo : UserControl
{
public ctrlDmcInfo()
{
InitializeComponent();
}
public void ProcessState(ref ApuDmcState state)
{
txtPeriod.Text = state.Period.ToString();
txtTimer.Text = state.Timer.ToString();
txtOutputVolume.Text = state.OutputVolume.ToString();
txtSampleRate.Text = ((int)state.SampleRate).ToString();
txtSampleAddress.Text = state.SampleAddr.ToString("X4");
txtSampleLength.Text = state.SampleLength.ToString();
txtBytesRemaining.Text = state.BytesRemaining.ToString();
chkEnabled.Checked = state.BytesRemaining > 0;
chkLoop.Checked = state.Loop;
chkIrqEnabled.Checked = state.IrqEnabled;
}
}
}

View file

@ -0,0 +1,120 @@
<?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>
</root>

View file

@ -0,0 +1,199 @@
namespace Mesen.GUI.Debugger.Controls.ApuViewer
{
partial class ctrlEnvelopeInfo
{
/// <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 Component 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.txtDivider = new System.Windows.Forms.TextBox();
this.txtCounter = new System.Windows.Forms.TextBox();
this.lblCounter = new System.Windows.Forms.Label();
this.lblDivider = new System.Windows.Forms.Label();
this.chkStart = new System.Windows.Forms.CheckBox();
this.chkConstantVolume = new System.Windows.Forms.CheckBox();
this.lblVolume = new System.Windows.Forms.Label();
this.txtVolume = new System.Windows.Forms.TextBox();
this.chkLoop = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.txtDivider, 1, 5);
this.tableLayoutPanel1.Controls.Add(this.txtCounter, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.lblCounter, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.lblDivider, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.chkStart, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.chkConstantVolume, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.lblVolume, 0, 6);
this.tableLayoutPanel1.Controls.Add(this.txtVolume, 1, 6);
this.tableLayoutPanel1.Controls.Add(this.chkLoop, 0, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 8;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(110, 147);
this.tableLayoutPanel1.TabIndex = 1;
//
// txtDivider
//
this.txtDivider.BackColor = System.Drawing.Color.White;
this.txtDivider.Location = new System.Drawing.Point(56, 98);
this.txtDivider.Name = "txtDivider";
this.txtDivider.ReadOnly = true;
this.txtDivider.Size = new System.Drawing.Size(40, 20);
this.txtDivider.TabIndex = 5;
//
// txtCounter
//
this.txtCounter.BackColor = System.Drawing.Color.White;
this.txtCounter.Location = new System.Drawing.Point(56, 72);
this.txtCounter.Name = "txtCounter";
this.txtCounter.ReadOnly = true;
this.txtCounter.Size = new System.Drawing.Size(40, 20);
this.txtCounter.TabIndex = 4;
//
// lblCounter
//
this.lblCounter.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblCounter.AutoSize = true;
this.lblCounter.Location = new System.Drawing.Point(3, 75);
this.lblCounter.Name = "lblCounter";
this.lblCounter.Size = new System.Drawing.Size(47, 13);
this.lblCounter.TabIndex = 2;
this.lblCounter.Text = "Counter:";
//
// lblDivider
//
this.lblDivider.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblDivider.AutoSize = true;
this.lblDivider.Location = new System.Drawing.Point(3, 101);
this.lblDivider.Name = "lblDivider";
this.lblDivider.Size = new System.Drawing.Size(43, 13);
this.lblDivider.TabIndex = 1;
this.lblDivider.Text = "Divider:";
//
// chkStart
//
this.chkStart.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkStart.AutoCheck = false;
this.chkStart.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkStart, 2);
this.chkStart.Location = new System.Drawing.Point(0, 3);
this.chkStart.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.chkStart.Name = "chkStart";
this.chkStart.Size = new System.Drawing.Size(71, 17);
this.chkStart.TabIndex = 6;
this.chkStart.Text = "Start Flag";
this.chkStart.UseVisualStyleBackColor = true;
//
// chkConstantVolume
//
this.chkConstantVolume.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkConstantVolume.AutoCheck = false;
this.chkConstantVolume.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkConstantVolume, 2);
this.chkConstantVolume.Location = new System.Drawing.Point(0, 49);
this.chkConstantVolume.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.chkConstantVolume.Name = "chkConstantVolume";
this.chkConstantVolume.Size = new System.Drawing.Size(106, 17);
this.chkConstantVolume.TabIndex = 8;
this.chkConstantVolume.Text = "Constant Volume";
this.chkConstantVolume.UseVisualStyleBackColor = true;
//
// lblVolume
//
this.lblVolume.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblVolume.AutoSize = true;
this.lblVolume.Location = new System.Drawing.Point(3, 127);
this.lblVolume.Name = "lblVolume";
this.lblVolume.Size = new System.Drawing.Size(45, 13);
this.lblVolume.TabIndex = 9;
this.lblVolume.Text = "Volume:";
//
// txtVolume
//
this.txtVolume.BackColor = System.Drawing.Color.White;
this.txtVolume.Location = new System.Drawing.Point(56, 124);
this.txtVolume.Name = "txtVolume";
this.txtVolume.ReadOnly = true;
this.txtVolume.Size = new System.Drawing.Size(40, 20);
this.txtVolume.TabIndex = 10;
//
// chkLoop
//
this.chkLoop.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkLoop.AutoCheck = false;
this.chkLoop.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkLoop, 2);
this.chkLoop.Location = new System.Drawing.Point(0, 26);
this.chkLoop.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.chkLoop.Name = "chkLoop";
this.chkLoop.Size = new System.Drawing.Size(50, 17);
this.chkLoop.TabIndex = 7;
this.chkLoop.Text = "Loop";
this.chkLoop.UseVisualStyleBackColor = true;
//
// ctrlEnvelopeInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLayoutPanel1);
this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "ctrlEnvelopeInfo";
this.Size = new System.Drawing.Size(110, 147);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.TextBox txtDivider;
private System.Windows.Forms.TextBox txtCounter;
private System.Windows.Forms.Label lblCounter;
private System.Windows.Forms.Label lblDivider;
private System.Windows.Forms.CheckBox chkStart;
private System.Windows.Forms.CheckBox chkLoop;
private System.Windows.Forms.CheckBox chkConstantVolume;
private System.Windows.Forms.Label lblVolume;
private System.Windows.Forms.TextBox txtVolume;
}
}

View file

@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesen.GUI.Debugger.Controls.ApuViewer
{
public partial class ctrlEnvelopeInfo : UserControl
{
public ctrlEnvelopeInfo()
{
InitializeComponent();
}
public void ProcessState(ref ApuEnvelopeState state)
{
chkStart.Checked = state.StartFlag;
chkLoop.Checked = state.Loop;
chkConstantVolume.Checked = state.ConstantVolume;
txtCounter.Text = state.Counter.ToString();
txtDivider.Text = state.Divider.ToString();
txtVolume.Text = state.Volume.ToString();
}
}
}

View file

@ -0,0 +1,120 @@
<?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>
</root>

View file

@ -0,0 +1,131 @@
namespace Mesen.GUI.Debugger.Controls
{
partial class ctrlFrameCounterInfo
{
/// <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 Component 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.lblCurrentStep = new System.Windows.Forms.Label();
this.txtCurrentStep = new System.Windows.Forms.TextBox();
this.chkIrqEnabled = new System.Windows.Forms.CheckBox();
this.chkFiveStepMode = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Controls.Add(this.lblCurrentStep, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.txtCurrentStep, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.chkIrqEnabled, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.chkFiveStepMode, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 4;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(125, 76);
this.tableLayoutPanel1.TabIndex = 0;
//
// lblCurrentStep
//
this.lblCurrentStep.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblCurrentStep.AutoSize = true;
this.lblCurrentStep.Location = new System.Drawing.Point(3, 52);
this.lblCurrentStep.Name = "lblCurrentStep";
this.lblCurrentStep.Size = new System.Drawing.Size(69, 13);
this.lblCurrentStep.TabIndex = 0;
this.lblCurrentStep.Text = "Current Step:";
//
// txtCurrentStep
//
this.txtCurrentStep.BackColor = System.Drawing.Color.White;
this.txtCurrentStep.Location = new System.Drawing.Point(78, 49);
this.txtCurrentStep.Name = "txtCurrentStep";
this.txtCurrentStep.ReadOnly = true;
this.txtCurrentStep.Size = new System.Drawing.Size(39, 20);
this.txtCurrentStep.TabIndex = 4;
//
// chkIrqEnabled
//
this.chkIrqEnabled.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkIrqEnabled.AutoCheck = false;
this.chkIrqEnabled.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkIrqEnabled, 2);
this.chkIrqEnabled.Location = new System.Drawing.Point(3, 26);
this.chkIrqEnabled.Name = "chkIrqEnabled";
this.chkIrqEnabled.Size = new System.Drawing.Size(87, 17);
this.chkIrqEnabled.TabIndex = 3;
this.chkIrqEnabled.Text = "IRQ Enabled";
this.chkIrqEnabled.UseVisualStyleBackColor = true;
//
// chkFiveStepMode
//
this.chkFiveStepMode.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkFiveStepMode.AutoCheck = false;
this.chkFiveStepMode.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkFiveStepMode, 2);
this.chkFiveStepMode.Location = new System.Drawing.Point(3, 3);
this.chkFiveStepMode.Name = "chkFiveStepMode";
this.chkFiveStepMode.Size = new System.Drawing.Size(84, 17);
this.chkFiveStepMode.TabIndex = 15;
this.chkFiveStepMode.Text = "5-step mode";
this.chkFiveStepMode.UseVisualStyleBackColor = true;
//
// ctrlFrameCounterInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "ctrlFrameCounterInfo";
this.Size = new System.Drawing.Size(125, 76);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label lblCurrentStep;
private System.Windows.Forms.CheckBox chkIrqEnabled;
private System.Windows.Forms.TextBox txtCurrentStep;
private System.Windows.Forms.CheckBox chkFiveStepMode;
}
}

View file

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesen.GUI.Debugger.Controls
{
public partial class ctrlFrameCounterInfo : UserControl
{
public ctrlFrameCounterInfo()
{
InitializeComponent();
}
public void ProcessState(ref ApuFrameCounterState state)
{
chkFiveStepMode.Checked = state.FiveStepMode;
chkIrqEnabled.Checked = state.IrqEnabled;
txtCurrentStep.Text = state.SequencePosition.ToString();
}
}
}

View file

@ -0,0 +1,120 @@
<?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>
</root>

View file

@ -0,0 +1,135 @@
namespace Mesen.GUI.Debugger.Controls.ApuViewer
{
partial class ctrlLengthCounterInfo
{
/// <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 Component 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.txtReloadValue = new System.Windows.Forms.TextBox();
this.txtCounter = new System.Windows.Forms.TextBox();
this.lblCounter = new System.Windows.Forms.Label();
this.lblReloadValue = new System.Windows.Forms.Label();
this.chkHalt = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.txtReloadValue, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.txtCounter, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.lblCounter, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.lblReloadValue, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.chkHalt, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 4;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(127, 77);
this.tableLayoutPanel1.TabIndex = 0;
//
// txtReloadValue
//
this.txtReloadValue.BackColor = System.Drawing.Color.White;
this.txtReloadValue.Location = new System.Drawing.Point(77, 52);
this.txtReloadValue.Name = "txtReloadValue";
this.txtReloadValue.ReadOnly = true;
this.txtReloadValue.Size = new System.Drawing.Size(40, 20);
this.txtReloadValue.TabIndex = 5;
//
// txtCounter
//
this.txtCounter.BackColor = System.Drawing.Color.White;
this.txtCounter.Location = new System.Drawing.Point(77, 26);
this.txtCounter.Name = "txtCounter";
this.txtCounter.ReadOnly = true;
this.txtCounter.Size = new System.Drawing.Size(40, 20);
this.txtCounter.TabIndex = 4;
//
// lblCounter
//
this.lblCounter.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblCounter.AutoSize = true;
this.lblCounter.Location = new System.Drawing.Point(0, 29);
this.lblCounter.Margin = new System.Windows.Forms.Padding(0);
this.lblCounter.Name = "lblCounter";
this.lblCounter.Size = new System.Drawing.Size(47, 13);
this.lblCounter.TabIndex = 2;
this.lblCounter.Text = "Counter:";
//
// lblReloadValue
//
this.lblReloadValue.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblReloadValue.AutoSize = true;
this.lblReloadValue.Location = new System.Drawing.Point(0, 55);
this.lblReloadValue.Margin = new System.Windows.Forms.Padding(0);
this.lblReloadValue.Name = "lblReloadValue";
this.lblReloadValue.Size = new System.Drawing.Size(74, 13);
this.lblReloadValue.TabIndex = 1;
this.lblReloadValue.Text = "Reload Value:";
//
// chkHalt
//
this.chkHalt.AutoCheck = false;
this.chkHalt.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkHalt, 2);
this.chkHalt.Location = new System.Drawing.Point(3, 3);
this.chkHalt.Name = "chkHalt";
this.chkHalt.Size = new System.Drawing.Size(45, 17);
this.chkHalt.TabIndex = 6;
this.chkHalt.Text = "Halt";
this.chkHalt.UseVisualStyleBackColor = true;
//
// ctrlLengthCounterInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "ctrlLengthCounterInfo";
this.Size = new System.Drawing.Size(127, 77);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.TextBox txtReloadValue;
private System.Windows.Forms.TextBox txtCounter;
private System.Windows.Forms.Label lblCounter;
private System.Windows.Forms.Label lblReloadValue;
private System.Windows.Forms.CheckBox chkHalt;
}
}

View file

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Mesen.GUI.Forms;
namespace Mesen.GUI.Debugger.Controls.ApuViewer
{
public partial class ctrlLengthCounterInfo : UserControl
{
public ctrlLengthCounterInfo()
{
InitializeComponent();
}
public void ProcessState(ref ApuLengthCounterState state)
{
chkHalt.Checked = state.Halt;
txtCounter.Text = state.Counter.ToString();
txtReloadValue.Text = state.ReloadValue.ToString();
}
}
}

View file

@ -0,0 +1,120 @@
<?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>
</root>

View file

@ -0,0 +1,308 @@
namespace Mesen.GUI.Debugger.Controls
{
partial class ctrlNoiseInfo
{
/// <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 Component 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.chkModeFlag = new System.Windows.Forms.CheckBox();
this.chkEnabled = new System.Windows.Forms.CheckBox();
this.lblPeriod = new System.Windows.Forms.Label();
this.txtPeriod = new System.Windows.Forms.TextBox();
this.lblFrequency = new System.Windows.Forms.Label();
this.txtFrequency = new System.Windows.Forms.TextBox();
this.lblShiftRegister = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtOutputVolume = new System.Windows.Forms.TextBox();
this.txtShiftRegister = new System.Windows.Forms.TextBox();
this.grpEnvelope = new System.Windows.Forms.GroupBox();
this.ctrlEnvelopeInfo = new Mesen.GUI.Debugger.Controls.ApuViewer.ctrlEnvelopeInfo();
this.grpLengthCounter = new System.Windows.Forms.GroupBox();
this.ctrlLengthCounterInfo = new Mesen.GUI.Debugger.Controls.ApuViewer.ctrlLengthCounterInfo();
this.lblHz = new System.Windows.Forms.Label();
this.lblTimer = new System.Windows.Forms.Label();
this.txtTimer = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1.SuspendLayout();
this.grpEnvelope.SuspendLayout();
this.grpLengthCounter.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 6;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.chkModeFlag, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.chkEnabled, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.lblPeriod, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.txtPeriod, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.lblFrequency, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.txtFrequency, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.lblShiftRegister, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 6);
this.tableLayoutPanel1.Controls.Add(this.txtOutputVolume, 1, 6);
this.tableLayoutPanel1.Controls.Add(this.txtShiftRegister, 1, 5);
this.tableLayoutPanel1.Controls.Add(this.grpEnvelope, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.grpLengthCounter, 4, 0);
this.tableLayoutPanel1.Controls.Add(this.lblHz, 2, 4);
this.tableLayoutPanel1.Controls.Add(this.lblTimer, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.txtTimer, 1, 3);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 8;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(454, 177);
this.tableLayoutPanel1.TabIndex = 0;
//
// chkModeFlag
//
this.chkModeFlag.AutoCheck = false;
this.chkModeFlag.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkModeFlag, 2);
this.chkModeFlag.Location = new System.Drawing.Point(3, 26);
this.chkModeFlag.Name = "chkModeFlag";
this.chkModeFlag.Size = new System.Drawing.Size(76, 17);
this.chkModeFlag.TabIndex = 15;
this.chkModeFlag.Text = "Mode Flag";
this.chkModeFlag.UseVisualStyleBackColor = true;
//
// chkEnabled
//
this.chkEnabled.AutoCheck = false;
this.chkEnabled.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkEnabled, 2);
this.chkEnabled.Location = new System.Drawing.Point(3, 3);
this.chkEnabled.Name = "chkEnabled";
this.chkEnabled.Size = new System.Drawing.Size(65, 17);
this.chkEnabled.TabIndex = 3;
this.chkEnabled.Text = "Enabled";
this.chkEnabled.UseVisualStyleBackColor = true;
//
// lblPeriod
//
this.lblPeriod.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblPeriod.AutoSize = true;
this.lblPeriod.Location = new System.Drawing.Point(0, 52);
this.lblPeriod.Margin = new System.Windows.Forms.Padding(0);
this.lblPeriod.Name = "lblPeriod";
this.lblPeriod.Size = new System.Drawing.Size(40, 13);
this.lblPeriod.TabIndex = 0;
this.lblPeriod.Text = "Period:";
//
// txtPeriod
//
this.txtPeriod.BackColor = System.Drawing.Color.White;
this.txtPeriod.Location = new System.Drawing.Point(83, 49);
this.txtPeriod.Name = "txtPeriod";
this.txtPeriod.ReadOnly = true;
this.txtPeriod.Size = new System.Drawing.Size(39, 20);
this.txtPeriod.TabIndex = 4;
//
// lblFrequency
//
this.lblFrequency.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblFrequency.AutoSize = true;
this.lblFrequency.Location = new System.Drawing.Point(0, 104);
this.lblFrequency.Margin = new System.Windows.Forms.Padding(0);
this.lblFrequency.Name = "lblFrequency";
this.lblFrequency.Size = new System.Drawing.Size(60, 13);
this.lblFrequency.TabIndex = 1;
this.lblFrequency.Text = "Frequency:";
//
// txtFrequency
//
this.txtFrequency.BackColor = System.Drawing.Color.White;
this.txtFrequency.Location = new System.Drawing.Point(83, 101);
this.txtFrequency.Name = "txtFrequency";
this.txtFrequency.ReadOnly = true;
this.txtFrequency.Size = new System.Drawing.Size(59, 20);
this.txtFrequency.TabIndex = 5;
//
// lblShiftRegister
//
this.lblShiftRegister.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblShiftRegister.AutoSize = true;
this.lblShiftRegister.Location = new System.Drawing.Point(0, 130);
this.lblShiftRegister.Margin = new System.Windows.Forms.Padding(0);
this.lblShiftRegister.Name = "lblShiftRegister";
this.lblShiftRegister.Size = new System.Drawing.Size(73, 13);
this.lblShiftRegister.TabIndex = 6;
this.lblShiftRegister.Text = "Shift Register:";
//
// label1
//
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(0, 156);
this.label1.Margin = new System.Windows.Forms.Padding(0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 13);
this.label1.TabIndex = 7;
this.label1.Text = "Output Volume:";
//
// txtOutputVolume
//
this.txtOutputVolume.BackColor = System.Drawing.Color.White;
this.txtOutputVolume.Location = new System.Drawing.Point(83, 153);
this.txtOutputVolume.Name = "txtOutputVolume";
this.txtOutputVolume.ReadOnly = true;
this.txtOutputVolume.Size = new System.Drawing.Size(39, 20);
this.txtOutputVolume.TabIndex = 8;
//
// txtShiftRegister
//
this.txtShiftRegister.BackColor = System.Drawing.Color.White;
this.txtShiftRegister.Location = new System.Drawing.Point(83, 127);
this.txtShiftRegister.Name = "txtShiftRegister";
this.txtShiftRegister.ReadOnly = true;
this.txtShiftRegister.Size = new System.Drawing.Size(39, 20);
this.txtShiftRegister.TabIndex = 9;
//
// grpEnvelope
//
this.grpEnvelope.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.grpEnvelope.Controls.Add(this.ctrlEnvelopeInfo);
this.grpEnvelope.Location = new System.Drawing.Point(168, 3);
this.grpEnvelope.Name = "grpEnvelope";
this.tableLayoutPanel1.SetRowSpan(this.grpEnvelope, 8);
this.grpEnvelope.Size = new System.Drawing.Size(122, 171);
this.grpEnvelope.TabIndex = 12;
this.grpEnvelope.TabStop = false;
this.grpEnvelope.Text = "Envelope";
//
// ctrlEnvelopeInfo
//
this.ctrlEnvelopeInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlEnvelopeInfo.Location = new System.Drawing.Point(3, 16);
this.ctrlEnvelopeInfo.Margin = new System.Windows.Forms.Padding(0);
this.ctrlEnvelopeInfo.Name = "ctrlEnvelopeInfo";
this.ctrlEnvelopeInfo.Size = new System.Drawing.Size(116, 152);
this.ctrlEnvelopeInfo.TabIndex = 1;
//
// grpLengthCounter
//
this.grpLengthCounter.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.grpLengthCounter.Controls.Add(this.ctrlLengthCounterInfo);
this.grpLengthCounter.Location = new System.Drawing.Point(296, 3);
this.grpLengthCounter.Name = "grpLengthCounter";
this.tableLayoutPanel1.SetRowSpan(this.grpLengthCounter, 8);
this.grpLengthCounter.Size = new System.Drawing.Size(126, 171);
this.grpLengthCounter.TabIndex = 10;
this.grpLengthCounter.TabStop = false;
this.grpLengthCounter.Text = "Length Counter";
//
// ctrlLengthCounterInfo
//
this.ctrlLengthCounterInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlLengthCounterInfo.Location = new System.Drawing.Point(3, 16);
this.ctrlLengthCounterInfo.Name = "ctrlLengthCounterInfo";
this.ctrlLengthCounterInfo.Size = new System.Drawing.Size(120, 152);
this.ctrlLengthCounterInfo.TabIndex = 2;
//
// lblHz
//
this.lblHz.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblHz.AutoSize = true;
this.lblHz.Location = new System.Drawing.Point(145, 104);
this.lblHz.Margin = new System.Windows.Forms.Padding(0);
this.lblHz.Name = "lblHz";
this.lblHz.Size = new System.Drawing.Size(20, 13);
this.lblHz.TabIndex = 14;
this.lblHz.Text = "Hz";
//
// lblTimer
//
this.lblTimer.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblTimer.AutoSize = true;
this.lblTimer.Location = new System.Drawing.Point(0, 78);
this.lblTimer.Margin = new System.Windows.Forms.Padding(0);
this.lblTimer.Name = "lblTimer";
this.lblTimer.Size = new System.Drawing.Size(36, 13);
this.lblTimer.TabIndex = 16;
this.lblTimer.Text = "Timer:";
//
// txtTimer
//
this.txtTimer.BackColor = System.Drawing.Color.White;
this.txtTimer.Location = new System.Drawing.Point(83, 75);
this.txtTimer.Name = "txtTimer";
this.txtTimer.ReadOnly = true;
this.txtTimer.Size = new System.Drawing.Size(39, 20);
this.txtTimer.TabIndex = 17;
//
// ctrlNoiseInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "ctrlNoiseInfo";
this.Size = new System.Drawing.Size(454, 177);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.grpEnvelope.ResumeLayout(false);
this.grpLengthCounter.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label lblPeriod;
private System.Windows.Forms.Label lblFrequency;
private ApuViewer.ctrlEnvelopeInfo ctrlEnvelopeInfo;
private ApuViewer.ctrlLengthCounterInfo ctrlLengthCounterInfo;
private System.Windows.Forms.CheckBox chkEnabled;
private System.Windows.Forms.TextBox txtPeriod;
private System.Windows.Forms.TextBox txtFrequency;
private System.Windows.Forms.Label lblShiftRegister;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtOutputVolume;
private System.Windows.Forms.TextBox txtShiftRegister;
private System.Windows.Forms.GroupBox grpEnvelope;
private System.Windows.Forms.GroupBox grpLengthCounter;
private System.Windows.Forms.Label lblHz;
private System.Windows.Forms.CheckBox chkModeFlag;
private System.Windows.Forms.Label lblTimer;
private System.Windows.Forms.TextBox txtTimer;
}
}

View file

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesen.GUI.Debugger.Controls
{
public partial class ctrlNoiseInfo : UserControl
{
public ctrlNoiseInfo()
{
InitializeComponent();
}
public void ProcessState(ref ApuNoiseState state)
{
chkEnabled.Checked = state.Enabled;
txtPeriod.Text = state.Period.ToString();
txtTimer.Text = state.Timer.ToString();
txtFrequency.Text = ((int)(state.Frequency)).ToString();
txtShiftRegister.Text = state.ShiftRegister.ToString("X4");
txtOutputVolume.Text = state.OutputVolume.ToString();
ctrlLengthCounterInfo.ProcessState(ref state.LengthCounter);
ctrlEnvelopeInfo.ProcessState(ref state.Envelope);
}
}
}

View file

@ -0,0 +1,120 @@
<?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>
</root>

View file

@ -0,0 +1,442 @@
namespace Mesen.GUI.Debugger.Controls
{
partial class ctrlSquareInfo
{
/// <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 Component 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.chkEnabled = new System.Windows.Forms.CheckBox();
this.lblPeriod = new System.Windows.Forms.Label();
this.txtPeriod = new System.Windows.Forms.TextBox();
this.lblFrequency = new System.Windows.Forms.Label();
this.txtFrequency = new System.Windows.Forms.TextBox();
this.lblDuty = new System.Windows.Forms.Label();
this.lblDutyPosition = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtOutputVolume = new System.Windows.Forms.TextBox();
this.txtDutyPosition = new System.Windows.Forms.TextBox();
this.grpEnvelope = new System.Windows.Forms.GroupBox();
this.ctrlEnvelopeInfo = new Mesen.GUI.Debugger.Controls.ApuViewer.ctrlEnvelopeInfo();
this.grpSweep = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.chkSweepEnabled = new System.Windows.Forms.CheckBox();
this.lblSweepShift = new System.Windows.Forms.Label();
this.lblSweepPeriod = new System.Windows.Forms.Label();
this.chkSweepNegate = new System.Windows.Forms.CheckBox();
this.txtSweepPeriod = new System.Windows.Forms.TextBox();
this.txtSweepShift = new System.Windows.Forms.TextBox();
this.txtDuty = new System.Windows.Forms.TextBox();
this.grpLengthCounter = new System.Windows.Forms.GroupBox();
this.ctrlLengthCounterInfo = new Mesen.GUI.Debugger.Controls.ApuViewer.ctrlLengthCounterInfo();
this.lblHz = new System.Windows.Forms.Label();
this.lblTimer = new System.Windows.Forms.Label();
this.txtTimer = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1.SuspendLayout();
this.grpEnvelope.SuspendLayout();
this.grpSweep.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.grpLengthCounter.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 7;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.chkEnabled, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.lblPeriod, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.txtPeriod, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.lblFrequency, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.txtFrequency, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.lblDuty, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.lblDutyPosition, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 6);
this.tableLayoutPanel1.Controls.Add(this.txtOutputVolume, 1, 6);
this.tableLayoutPanel1.Controls.Add(this.txtDutyPosition, 1, 5);
this.tableLayoutPanel1.Controls.Add(this.grpEnvelope, 4, 0);
this.tableLayoutPanel1.Controls.Add(this.grpSweep, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.txtDuty, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.grpLengthCounter, 5, 0);
this.tableLayoutPanel1.Controls.Add(this.lblHz, 2, 3);
this.tableLayoutPanel1.Controls.Add(this.lblTimer, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.txtTimer, 1, 2);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 8;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(546, 180);
this.tableLayoutPanel1.TabIndex = 0;
//
// chkEnabled
//
this.chkEnabled.AutoCheck = false;
this.chkEnabled.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkEnabled, 2);
this.chkEnabled.Location = new System.Drawing.Point(3, 3);
this.chkEnabled.Name = "chkEnabled";
this.chkEnabled.Size = new System.Drawing.Size(65, 17);
this.chkEnabled.TabIndex = 3;
this.chkEnabled.Text = "Enabled";
this.chkEnabled.UseVisualStyleBackColor = true;
//
// lblPeriod
//
this.lblPeriod.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblPeriod.AutoSize = true;
this.lblPeriod.Location = new System.Drawing.Point(0, 29);
this.lblPeriod.Margin = new System.Windows.Forms.Padding(0);
this.lblPeriod.Name = "lblPeriod";
this.lblPeriod.Size = new System.Drawing.Size(40, 13);
this.lblPeriod.TabIndex = 0;
this.lblPeriod.Text = "Period:";
//
// txtPeriod
//
this.txtPeriod.BackColor = System.Drawing.Color.White;
this.txtPeriod.Location = new System.Drawing.Point(83, 26);
this.txtPeriod.Name = "txtPeriod";
this.txtPeriod.ReadOnly = true;
this.txtPeriod.Size = new System.Drawing.Size(39, 20);
this.txtPeriod.TabIndex = 4;
//
// lblFrequency
//
this.lblFrequency.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblFrequency.AutoSize = true;
this.lblFrequency.Location = new System.Drawing.Point(0, 81);
this.lblFrequency.Margin = new System.Windows.Forms.Padding(0);
this.lblFrequency.Name = "lblFrequency";
this.lblFrequency.Size = new System.Drawing.Size(60, 13);
this.lblFrequency.TabIndex = 1;
this.lblFrequency.Text = "Frequency:";
//
// txtFrequency
//
this.txtFrequency.BackColor = System.Drawing.Color.White;
this.txtFrequency.Location = new System.Drawing.Point(83, 78);
this.txtFrequency.Name = "txtFrequency";
this.txtFrequency.ReadOnly = true;
this.txtFrequency.Size = new System.Drawing.Size(59, 20);
this.txtFrequency.TabIndex = 5;
//
// lblDuty
//
this.lblDuty.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblDuty.AutoSize = true;
this.lblDuty.Location = new System.Drawing.Point(0, 107);
this.lblDuty.Margin = new System.Windows.Forms.Padding(0);
this.lblDuty.Name = "lblDuty";
this.lblDuty.Size = new System.Drawing.Size(32, 13);
this.lblDuty.TabIndex = 2;
this.lblDuty.Text = "Duty:";
//
// lblDutyPosition
//
this.lblDutyPosition.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblDutyPosition.AutoSize = true;
this.lblDutyPosition.Location = new System.Drawing.Point(0, 133);
this.lblDutyPosition.Margin = new System.Windows.Forms.Padding(0);
this.lblDutyPosition.Name = "lblDutyPosition";
this.lblDutyPosition.Size = new System.Drawing.Size(72, 13);
this.lblDutyPosition.TabIndex = 6;
this.lblDutyPosition.Text = "Duty Position:";
//
// label1
//
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(0, 159);
this.label1.Margin = new System.Windows.Forms.Padding(0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 13);
this.label1.TabIndex = 7;
this.label1.Text = "Output Volume:";
//
// txtOutputVolume
//
this.txtOutputVolume.BackColor = System.Drawing.Color.White;
this.txtOutputVolume.Location = new System.Drawing.Point(83, 156);
this.txtOutputVolume.Name = "txtOutputVolume";
this.txtOutputVolume.ReadOnly = true;
this.txtOutputVolume.Size = new System.Drawing.Size(39, 20);
this.txtOutputVolume.TabIndex = 8;
//
// txtDutyPosition
//
this.txtDutyPosition.BackColor = System.Drawing.Color.White;
this.txtDutyPosition.Location = new System.Drawing.Point(83, 130);
this.txtDutyPosition.Name = "txtDutyPosition";
this.txtDutyPosition.ReadOnly = true;
this.txtDutyPosition.Size = new System.Drawing.Size(39, 20);
this.txtDutyPosition.TabIndex = 9;
//
// grpEnvelope
//
this.grpEnvelope.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.grpEnvelope.Controls.Add(this.ctrlEnvelopeInfo);
this.grpEnvelope.Location = new System.Drawing.Point(273, 3);
this.grpEnvelope.Name = "grpEnvelope";
this.tableLayoutPanel1.SetRowSpan(this.grpEnvelope, 7);
this.grpEnvelope.Size = new System.Drawing.Size(133, 173);
this.grpEnvelope.TabIndex = 12;
this.grpEnvelope.TabStop = false;
this.grpEnvelope.Text = "Envelope";
//
// ctrlEnvelopeInfo
//
this.ctrlEnvelopeInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlEnvelopeInfo.Location = new System.Drawing.Point(3, 16);
this.ctrlEnvelopeInfo.Margin = new System.Windows.Forms.Padding(0);
this.ctrlEnvelopeInfo.Name = "ctrlEnvelopeInfo";
this.ctrlEnvelopeInfo.Size = new System.Drawing.Size(127, 154);
this.ctrlEnvelopeInfo.TabIndex = 1;
//
// grpSweep
//
this.grpSweep.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.grpSweep.Controls.Add(this.tableLayoutPanel2);
this.grpSweep.Location = new System.Drawing.Point(168, 3);
this.grpSweep.Name = "grpSweep";
this.tableLayoutPanel1.SetRowSpan(this.grpSweep, 7);
this.grpSweep.Size = new System.Drawing.Size(99, 173);
this.grpSweep.TabIndex = 11;
this.grpSweep.TabStop = false;
this.grpSweep.Text = "Sweep Unit";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 3;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Controls.Add(this.chkSweepEnabled, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.lblSweepShift, 0, 3);
this.tableLayoutPanel2.Controls.Add(this.lblSweepPeriod, 0, 2);
this.tableLayoutPanel2.Controls.Add(this.chkSweepNegate, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.txtSweepPeriod, 1, 2);
this.tableLayoutPanel2.Controls.Add(this.txtSweepShift, 1, 3);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 16);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 5;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(93, 154);
this.tableLayoutPanel2.TabIndex = 0;
//
// chkSweepEnabled
//
this.chkSweepEnabled.AutoCheck = false;
this.chkSweepEnabled.AutoSize = true;
this.tableLayoutPanel2.SetColumnSpan(this.chkSweepEnabled, 2);
this.chkSweepEnabled.Location = new System.Drawing.Point(3, 3);
this.chkSweepEnabled.Name = "chkSweepEnabled";
this.chkSweepEnabled.Size = new System.Drawing.Size(65, 17);
this.chkSweepEnabled.TabIndex = 6;
this.chkSweepEnabled.Text = "Enabled";
this.chkSweepEnabled.UseVisualStyleBackColor = true;
//
// lblSweepShift
//
this.lblSweepShift.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblSweepShift.AutoSize = true;
this.lblSweepShift.Location = new System.Drawing.Point(3, 78);
this.lblSweepShift.Name = "lblSweepShift";
this.lblSweepShift.Size = new System.Drawing.Size(31, 13);
this.lblSweepShift.TabIndex = 7;
this.lblSweepShift.Text = "Shift:";
//
// lblSweepPeriod
//
this.lblSweepPeriod.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblSweepPeriod.AutoSize = true;
this.lblSweepPeriod.Location = new System.Drawing.Point(3, 52);
this.lblSweepPeriod.Name = "lblSweepPeriod";
this.lblSweepPeriod.Size = new System.Drawing.Size(40, 13);
this.lblSweepPeriod.TabIndex = 1;
this.lblSweepPeriod.Text = "Period:";
//
// chkSweepNegate
//
this.chkSweepNegate.AutoCheck = false;
this.chkSweepNegate.AutoSize = true;
this.tableLayoutPanel2.SetColumnSpan(this.chkSweepNegate, 2);
this.chkSweepNegate.Location = new System.Drawing.Point(3, 26);
this.chkSweepNegate.Name = "chkSweepNegate";
this.chkSweepNegate.Size = new System.Drawing.Size(61, 17);
this.chkSweepNegate.TabIndex = 8;
this.chkSweepNegate.Text = "Negate";
this.chkSweepNegate.UseVisualStyleBackColor = true;
//
// txtSweepPeriod
//
this.txtSweepPeriod.BackColor = System.Drawing.Color.White;
this.txtSweepPeriod.Location = new System.Drawing.Point(49, 49);
this.txtSweepPeriod.Name = "txtSweepPeriod";
this.txtSweepPeriod.ReadOnly = true;
this.txtSweepPeriod.Size = new System.Drawing.Size(39, 20);
this.txtSweepPeriod.TabIndex = 5;
//
// txtSweepShift
//
this.txtSweepShift.BackColor = System.Drawing.Color.White;
this.txtSweepShift.Location = new System.Drawing.Point(49, 75);
this.txtSweepShift.Name = "txtSweepShift";
this.txtSweepShift.ReadOnly = true;
this.txtSweepShift.Size = new System.Drawing.Size(39, 20);
this.txtSweepShift.TabIndex = 9;
//
// txtDuty
//
this.txtDuty.BackColor = System.Drawing.Color.White;
this.txtDuty.Location = new System.Drawing.Point(83, 104);
this.txtDuty.Name = "txtDuty";
this.txtDuty.ReadOnly = true;
this.txtDuty.Size = new System.Drawing.Size(39, 20);
this.txtDuty.TabIndex = 13;
//
// grpLengthCounter
//
this.grpLengthCounter.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.grpLengthCounter.Controls.Add(this.ctrlLengthCounterInfo);
this.grpLengthCounter.Location = new System.Drawing.Point(412, 3);
this.grpLengthCounter.Name = "grpLengthCounter";
this.tableLayoutPanel1.SetRowSpan(this.grpLengthCounter, 7);
this.grpLengthCounter.Size = new System.Drawing.Size(130, 173);
this.grpLengthCounter.TabIndex = 10;
this.grpLengthCounter.TabStop = false;
this.grpLengthCounter.Text = "Length Counter";
//
// ctrlLengthCounterInfo
//
this.ctrlLengthCounterInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlLengthCounterInfo.Location = new System.Drawing.Point(3, 16);
this.ctrlLengthCounterInfo.Name = "ctrlLengthCounterInfo";
this.ctrlLengthCounterInfo.Size = new System.Drawing.Size(124, 154);
this.ctrlLengthCounterInfo.TabIndex = 2;
//
// lblHz
//
this.lblHz.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblHz.AutoSize = true;
this.lblHz.Location = new System.Drawing.Point(145, 81);
this.lblHz.Margin = new System.Windows.Forms.Padding(0);
this.lblHz.Name = "lblHz";
this.lblHz.Size = new System.Drawing.Size(20, 13);
this.lblHz.TabIndex = 14;
this.lblHz.Text = "Hz";
//
// lblTimer
//
this.lblTimer.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblTimer.AutoSize = true;
this.lblTimer.Location = new System.Drawing.Point(0, 55);
this.lblTimer.Margin = new System.Windows.Forms.Padding(0);
this.lblTimer.Name = "lblTimer";
this.lblTimer.Size = new System.Drawing.Size(36, 13);
this.lblTimer.TabIndex = 15;
this.lblTimer.Text = "Timer:";
//
// txtTimer
//
this.txtTimer.BackColor = System.Drawing.Color.White;
this.txtTimer.Location = new System.Drawing.Point(83, 52);
this.txtTimer.Name = "txtTimer";
this.txtTimer.ReadOnly = true;
this.txtTimer.Size = new System.Drawing.Size(39, 20);
this.txtTimer.TabIndex = 16;
//
// ctrlSquareInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "ctrlSquareInfo";
this.Size = new System.Drawing.Size(546, 180);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.grpEnvelope.ResumeLayout(false);
this.grpSweep.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
this.grpLengthCounter.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label lblPeriod;
private System.Windows.Forms.Label lblFrequency;
private ApuViewer.ctrlEnvelopeInfo ctrlEnvelopeInfo;
private ApuViewer.ctrlLengthCounterInfo ctrlLengthCounterInfo;
private System.Windows.Forms.Label lblDuty;
private System.Windows.Forms.CheckBox chkEnabled;
private System.Windows.Forms.TextBox txtPeriod;
private System.Windows.Forms.TextBox txtFrequency;
private System.Windows.Forms.Label lblDutyPosition;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtOutputVolume;
private System.Windows.Forms.TextBox txtDutyPosition;
private System.Windows.Forms.GroupBox grpEnvelope;
private System.Windows.Forms.GroupBox grpLengthCounter;
private System.Windows.Forms.GroupBox grpSweep;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.Label lblSweepPeriod;
private System.Windows.Forms.TextBox txtSweepPeriod;
private System.Windows.Forms.CheckBox chkSweepEnabled;
private System.Windows.Forms.Label lblSweepShift;
private System.Windows.Forms.CheckBox chkSweepNegate;
private System.Windows.Forms.TextBox txtSweepShift;
private System.Windows.Forms.TextBox txtDuty;
private System.Windows.Forms.Label lblHz;
private System.Windows.Forms.Label lblTimer;
private System.Windows.Forms.TextBox txtTimer;
}
}

View file

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesen.GUI.Debugger.Controls
{
public partial class ctrlSquareInfo : UserControl
{
public ctrlSquareInfo()
{
InitializeComponent();
}
public void ProcessState(ref ApuSquareState state)
{
chkEnabled.Checked = state.Enabled;
txtPeriod.Text = state.Period.ToString();
txtTimer.Text = state.Timer.ToString();
txtFrequency.Text = ((int)(state.Frequency)).ToString();
txtDuty.Text = state.Duty.ToString();
txtDutyPosition.Text = state.DutyPosition.ToString();
txtOutputVolume.Text = state.OutputVolume.ToString();
chkSweepEnabled.Checked = state.SweepEnabled;
chkSweepNegate.Checked = state.SweepNegate;
txtSweepPeriod.Text = state.SweepPeriod.ToString();
txtSweepShift.Text = state.SweepShift.ToString();
ctrlLengthCounterInfo.ProcessState(ref state.LengthCounter);
ctrlEnvelopeInfo.ProcessState(ref state.Envelope);
}
}
}

View file

@ -0,0 +1,120 @@
<?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>
</root>

View file

@ -0,0 +1,257 @@
namespace Mesen.GUI.Debugger.Controls
{
partial class ctrlTriangleInfo
{
/// <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 Component 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.chkEnabled = new System.Windows.Forms.CheckBox();
this.lblPeriod = new System.Windows.Forms.Label();
this.txtPeriod = new System.Windows.Forms.TextBox();
this.lblFrequency = new System.Windows.Forms.Label();
this.txtFrequency = new System.Windows.Forms.TextBox();
this.lblSequencePosition = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtOutputVolume = new System.Windows.Forms.TextBox();
this.txtSequencePosition = new System.Windows.Forms.TextBox();
this.grpLengthCounter = new System.Windows.Forms.GroupBox();
this.ctrlLengthCounterInfo = new Mesen.GUI.Debugger.Controls.ApuViewer.ctrlLengthCounterInfo();
this.lblHz = new System.Windows.Forms.Label();
this.lblTimer = new System.Windows.Forms.Label();
this.txtTimer = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1.SuspendLayout();
this.grpLengthCounter.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 5;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.chkEnabled, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.lblPeriod, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.txtPeriod, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.lblFrequency, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.txtFrequency, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.lblSequencePosition, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.txtOutputVolume, 1, 5);
this.tableLayoutPanel1.Controls.Add(this.txtSequencePosition, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.grpLengthCounter, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.lblHz, 2, 3);
this.tableLayoutPanel1.Controls.Add(this.lblTimer, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.txtTimer, 1, 2);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 7;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(337, 156);
this.tableLayoutPanel1.TabIndex = 0;
//
// chkEnabled
//
this.chkEnabled.AutoCheck = false;
this.chkEnabled.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkEnabled, 2);
this.chkEnabled.Location = new System.Drawing.Point(3, 3);
this.chkEnabled.Name = "chkEnabled";
this.chkEnabled.Size = new System.Drawing.Size(65, 17);
this.chkEnabled.TabIndex = 3;
this.chkEnabled.Text = "Enabled";
this.chkEnabled.UseVisualStyleBackColor = true;
//
// lblPeriod
//
this.lblPeriod.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblPeriod.AutoSize = true;
this.lblPeriod.Location = new System.Drawing.Point(3, 29);
this.lblPeriod.Name = "lblPeriod";
this.lblPeriod.Size = new System.Drawing.Size(40, 13);
this.lblPeriod.TabIndex = 0;
this.lblPeriod.Text = "Period:";
//
// txtPeriod
//
this.txtPeriod.BackColor = System.Drawing.Color.White;
this.txtPeriod.Location = new System.Drawing.Point(102, 26);
this.txtPeriod.Name = "txtPeriod";
this.txtPeriod.ReadOnly = true;
this.txtPeriod.Size = new System.Drawing.Size(39, 20);
this.txtPeriod.TabIndex = 4;
//
// lblFrequency
//
this.lblFrequency.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblFrequency.AutoSize = true;
this.lblFrequency.Location = new System.Drawing.Point(3, 81);
this.lblFrequency.Name = "lblFrequency";
this.lblFrequency.Size = new System.Drawing.Size(60, 13);
this.lblFrequency.TabIndex = 1;
this.lblFrequency.Text = "Frequency:";
//
// txtFrequency
//
this.txtFrequency.BackColor = System.Drawing.Color.White;
this.txtFrequency.Location = new System.Drawing.Point(102, 78);
this.txtFrequency.Name = "txtFrequency";
this.txtFrequency.ReadOnly = true;
this.txtFrequency.Size = new System.Drawing.Size(59, 20);
this.txtFrequency.TabIndex = 5;
//
// lblSequencePosition
//
this.lblSequencePosition.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblSequencePosition.AutoSize = true;
this.lblSequencePosition.Location = new System.Drawing.Point(0, 107);
this.lblSequencePosition.Margin = new System.Windows.Forms.Padding(0);
this.lblSequencePosition.Name = "lblSequencePosition";
this.lblSequencePosition.Size = new System.Drawing.Size(99, 13);
this.lblSequencePosition.TabIndex = 6;
this.lblSequencePosition.Text = "Sequence Position:";
//
// label1
//
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 133);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 13);
this.label1.TabIndex = 7;
this.label1.Text = "Output Volume:";
//
// txtOutputVolume
//
this.txtOutputVolume.BackColor = System.Drawing.Color.White;
this.txtOutputVolume.Location = new System.Drawing.Point(102, 130);
this.txtOutputVolume.Name = "txtOutputVolume";
this.txtOutputVolume.ReadOnly = true;
this.txtOutputVolume.Size = new System.Drawing.Size(39, 20);
this.txtOutputVolume.TabIndex = 8;
//
// txtSequencePosition
//
this.txtSequencePosition.BackColor = System.Drawing.Color.White;
this.txtSequencePosition.Location = new System.Drawing.Point(102, 104);
this.txtSequencePosition.Name = "txtSequencePosition";
this.txtSequencePosition.ReadOnly = true;
this.txtSequencePosition.Size = new System.Drawing.Size(39, 20);
this.txtSequencePosition.TabIndex = 9;
//
// grpLengthCounter
//
this.grpLengthCounter.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.grpLengthCounter.Controls.Add(this.ctrlLengthCounterInfo);
this.grpLengthCounter.Location = new System.Drawing.Point(187, 3);
this.grpLengthCounter.Name = "grpLengthCounter";
this.tableLayoutPanel1.SetRowSpan(this.grpLengthCounter, 7);
this.grpLengthCounter.Size = new System.Drawing.Size(126, 150);
this.grpLengthCounter.TabIndex = 10;
this.grpLengthCounter.TabStop = false;
this.grpLengthCounter.Text = "Length Counter";
//
// ctrlLengthCounterInfo
//
this.ctrlLengthCounterInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlLengthCounterInfo.Location = new System.Drawing.Point(3, 16);
this.ctrlLengthCounterInfo.Name = "ctrlLengthCounterInfo";
this.ctrlLengthCounterInfo.Size = new System.Drawing.Size(120, 131);
this.ctrlLengthCounterInfo.TabIndex = 2;
//
// lblHz
//
this.lblHz.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblHz.AutoSize = true;
this.lblHz.Location = new System.Drawing.Point(164, 81);
this.lblHz.Margin = new System.Windows.Forms.Padding(0);
this.lblHz.Name = "lblHz";
this.lblHz.Size = new System.Drawing.Size(20, 13);
this.lblHz.TabIndex = 14;
this.lblHz.Text = "Hz";
//
// lblTimer
//
this.lblTimer.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblTimer.AutoSize = true;
this.lblTimer.Location = new System.Drawing.Point(3, 55);
this.lblTimer.Name = "lblTimer";
this.lblTimer.Size = new System.Drawing.Size(36, 13);
this.lblTimer.TabIndex = 15;
this.lblTimer.Text = "Timer:";
//
// txtTimer
//
this.txtTimer.BackColor = System.Drawing.Color.White;
this.txtTimer.Location = new System.Drawing.Point(102, 52);
this.txtTimer.Name = "txtTimer";
this.txtTimer.ReadOnly = true;
this.txtTimer.Size = new System.Drawing.Size(39, 20);
this.txtTimer.TabIndex = 16;
//
// ctrlTriangleInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "ctrlTriangleInfo";
this.Size = new System.Drawing.Size(337, 156);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.grpLengthCounter.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label lblPeriod;
private System.Windows.Forms.Label lblFrequency;
private System.Windows.Forms.CheckBox chkEnabled;
private System.Windows.Forms.TextBox txtPeriod;
private System.Windows.Forms.TextBox txtFrequency;
private System.Windows.Forms.Label lblSequencePosition;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtOutputVolume;
private System.Windows.Forms.TextBox txtSequencePosition;
private System.Windows.Forms.Label lblHz;
private System.Windows.Forms.GroupBox grpLengthCounter;
private ApuViewer.ctrlLengthCounterInfo ctrlLengthCounterInfo;
private System.Windows.Forms.Label lblTimer;
private System.Windows.Forms.TextBox txtTimer;
}
}

View file

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesen.GUI.Debugger.Controls
{
public partial class ctrlTriangleInfo : UserControl
{
public ctrlTriangleInfo()
{
InitializeComponent();
}
public void ProcessState(ref ApuTriangleState state)
{
chkEnabled.Checked = state.Enabled;
txtPeriod.Text = state.Period.ToString();
txtTimer.Text = state.Timer.ToString();
txtFrequency.Text = ((int)(state.Frequency)).ToString();
txtSequencePosition.Text = state.SequencePosition.ToString();
txtOutputVolume.Text = state.OutputVolume.ToString();
ctrlLengthCounterInfo.ProcessState(ref state.LengthCounter);
}
}
}

View file

@ -0,0 +1,120 @@
<?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>
</root>

View file

@ -26,6 +26,7 @@ namespace Mesen.GUI.Debugger
case DebugWindow.Assembler: frm = new frmAssembler(); break;
case DebugWindow.Debugger: frm = new frmDebugger(); break;
case DebugWindow.ScriptWindow: frm = new frmScript(); break;
case DebugWindow.ApuViewer: frm = new frmApuViewer(); break;
}
_openedWindows.Add(frm);
frm.FormClosed += Debugger_FormClosed;
@ -86,6 +87,7 @@ namespace Mesen.GUI.Debugger
case DebugWindow.TraceLogger: return _openedWindows.ToList().Find((form) => form.GetType() == typeof(frmTraceLogger));
case DebugWindow.Assembler: return _openedWindows.ToList().Find((form) => form.GetType() == typeof(frmAssembler));
case DebugWindow.Debugger: return _openedWindows.ToList().Find((form) => form.GetType() == typeof(frmDebugger));
case DebugWindow.ApuViewer: return _openedWindows.ToList().Find((form) => form.GetType() == typeof(frmApuViewer));
}
return null;
@ -110,5 +112,6 @@ namespace Mesen.GUI.Debugger
Assembler,
Debugger,
ScriptWindow,
ApuViewer
}
}

249
GUI.NET/Debugger/frmApuViewer.Designer.cs generated Normal file
View file

@ -0,0 +1,249 @@
namespace Mesen.GUI.Debugger
{
partial class frmApuViewer
{
/// <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.components = new System.ComponentModel.Container();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.grpSquare1 = new System.Windows.Forms.GroupBox();
this.ctrlSquareInfo1 = new Mesen.GUI.Debugger.Controls.ctrlSquareInfo();
this.grpSquare2 = new System.Windows.Forms.GroupBox();
this.ctrlSquareInfo2 = new Mesen.GUI.Debugger.Controls.ctrlSquareInfo();
this.grpTriangle = new System.Windows.Forms.GroupBox();
this.ctrlTriangleInfo = new Mesen.GUI.Debugger.Controls.ctrlTriangleInfo();
this.grpNoise = new System.Windows.Forms.GroupBox();
this.ctrlNoiseInfo = new Mesen.GUI.Debugger.Controls.ctrlNoiseInfo();
this.grpDmc = new System.Windows.Forms.GroupBox();
this.ctrlDmcInfo = new Mesen.GUI.Debugger.Controls.ctrlDmcInfo();
this.grpFrameCounter = new System.Windows.Forms.GroupBox();
this.ctrlFrameCounterInfo = new Mesen.GUI.Debugger.Controls.ctrlFrameCounterInfo();
this.tmrUpdate = new System.Windows.Forms.Timer(this.components);
this.tableLayoutPanel1.SuspendLayout();
this.grpSquare1.SuspendLayout();
this.grpSquare2.SuspendLayout();
this.grpTriangle.SuspendLayout();
this.grpNoise.SuspendLayout();
this.grpDmc.SuspendLayout();
this.grpFrameCounter.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.grpSquare1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.grpSquare2, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.grpTriangle, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.grpNoise, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.grpDmc, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.grpFrameCounter, 1, 2);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 4;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(990, 533);
this.tableLayoutPanel1.TabIndex = 0;
//
// grpSquare1
//
this.grpSquare1.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.grpSquare1.Controls.Add(this.ctrlSquareInfo1);
this.grpSquare1.Location = new System.Drawing.Point(3, 3);
this.grpSquare1.Name = "grpSquare1";
this.grpSquare1.Size = new System.Drawing.Size(549, 196);
this.grpSquare1.TabIndex = 3;
this.grpSquare1.TabStop = false;
this.grpSquare1.Text = "Square 1";
//
// ctrlSquareInfo1
//
this.ctrlSquareInfo1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlSquareInfo1.Location = new System.Drawing.Point(3, 16);
this.ctrlSquareInfo1.Name = "ctrlSquareInfo1";
this.ctrlSquareInfo1.Size = new System.Drawing.Size(543, 177);
this.ctrlSquareInfo1.TabIndex = 1;
//
// grpSquare2
//
this.grpSquare2.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.grpSquare2.Controls.Add(this.ctrlSquareInfo2);
this.grpSquare2.Location = new System.Drawing.Point(3, 205);
this.grpSquare2.Name = "grpSquare2";
this.grpSquare2.Size = new System.Drawing.Size(549, 197);
this.grpSquare2.TabIndex = 2;
this.grpSquare2.TabStop = false;
this.grpSquare2.Text = "Square 2";
//
// ctrlSquareInfo2
//
this.ctrlSquareInfo2.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlSquareInfo2.Location = new System.Drawing.Point(3, 16);
this.ctrlSquareInfo2.Name = "ctrlSquareInfo2";
this.ctrlSquareInfo2.Size = new System.Drawing.Size(543, 178);
this.ctrlSquareInfo2.TabIndex = 1;
//
// grpTriangle
//
this.grpTriangle.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.grpTriangle.Controls.Add(this.ctrlTriangleInfo);
this.grpTriangle.Location = new System.Drawing.Point(558, 3);
this.grpTriangle.Name = "grpTriangle";
this.grpTriangle.Size = new System.Drawing.Size(429, 196);
this.grpTriangle.TabIndex = 4;
this.grpTriangle.TabStop = false;
this.grpTriangle.Text = "Triangle";
//
// ctrlTriangleInfo
//
this.ctrlTriangleInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlTriangleInfo.Location = new System.Drawing.Point(3, 16);
this.ctrlTriangleInfo.Name = "ctrlTriangleInfo";
this.ctrlTriangleInfo.Size = new System.Drawing.Size(423, 177);
this.ctrlTriangleInfo.TabIndex = 0;
//
// grpNoise
//
this.grpNoise.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.grpNoise.Controls.Add(this.ctrlNoiseInfo);
this.grpNoise.Location = new System.Drawing.Point(558, 205);
this.grpNoise.Name = "grpNoise";
this.grpNoise.Size = new System.Drawing.Size(429, 197);
this.grpNoise.TabIndex = 5;
this.grpNoise.TabStop = false;
this.grpNoise.Text = "Noise";
//
// ctrlNoiseInfo
//
this.ctrlNoiseInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlNoiseInfo.Location = new System.Drawing.Point(3, 16);
this.ctrlNoiseInfo.Name = "ctrlNoiseInfo";
this.ctrlNoiseInfo.Size = new System.Drawing.Size(423, 178);
this.ctrlNoiseInfo.TabIndex = 0;
//
// grpDmc
//
this.grpDmc.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.grpDmc.Controls.Add(this.ctrlDmcInfo);
this.grpDmc.Location = new System.Drawing.Point(3, 408);
this.grpDmc.Name = "grpDmc";
this.grpDmc.Size = new System.Drawing.Size(549, 121);
this.grpDmc.TabIndex = 6;
this.grpDmc.TabStop = false;
this.grpDmc.Text = "DMC";
//
// ctrlDmcInfo
//
this.ctrlDmcInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlDmcInfo.Location = new System.Drawing.Point(3, 16);
this.ctrlDmcInfo.Name = "ctrlDmcInfo";
this.ctrlDmcInfo.Size = new System.Drawing.Size(543, 102);
this.ctrlDmcInfo.TabIndex = 0;
//
// grpFrameCounter
//
this.grpFrameCounter.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.grpFrameCounter.Controls.Add(this.ctrlFrameCounterInfo);
this.grpFrameCounter.Location = new System.Drawing.Point(558, 408);
this.grpFrameCounter.Name = "grpFrameCounter";
this.grpFrameCounter.Size = new System.Drawing.Size(429, 121);
this.grpFrameCounter.TabIndex = 7;
this.grpFrameCounter.TabStop = false;
this.grpFrameCounter.Text = "Frame Counter";
//
// ctrlFrameCounterInfo
//
this.ctrlFrameCounterInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlFrameCounterInfo.Location = new System.Drawing.Point(3, 16);
this.ctrlFrameCounterInfo.Name = "ctrlFrameCounterInfo";
this.ctrlFrameCounterInfo.Size = new System.Drawing.Size(423, 102);
this.ctrlFrameCounterInfo.TabIndex = 0;
//
// tmrUpdate
//
this.tmrUpdate.Interval = 67;
this.tmrUpdate.Tick += new System.EventHandler(this.tmrUpdate_Tick);
//
// frmApuViewer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(990, 533);
this.Controls.Add(this.tableLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmApuViewer";
this.Text = "APU Viewer";
this.tableLayoutPanel1.ResumeLayout(false);
this.grpSquare1.ResumeLayout(false);
this.grpSquare2.ResumeLayout(false);
this.grpTriangle.ResumeLayout(false);
this.grpNoise.ResumeLayout(false);
this.grpDmc.ResumeLayout(false);
this.grpFrameCounter.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Timer tmrUpdate;
private System.Windows.Forms.GroupBox grpSquare1;
private Controls.ctrlSquareInfo ctrlSquareInfo1;
private System.Windows.Forms.GroupBox grpSquare2;
private Controls.ctrlSquareInfo ctrlSquareInfo2;
private System.Windows.Forms.GroupBox grpTriangle;
private Controls.ctrlTriangleInfo ctrlTriangleInfo;
private System.Windows.Forms.GroupBox grpNoise;
private Controls.ctrlNoiseInfo ctrlNoiseInfo;
private System.Windows.Forms.GroupBox grpDmc;
private Controls.ctrlDmcInfo ctrlDmcInfo;
private System.Windows.Forms.GroupBox grpFrameCounter;
private Controls.ctrlFrameCounterInfo ctrlFrameCounterInfo;
}
}

View file

@ -0,0 +1,38 @@
using Mesen.GUI.Forms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesen.GUI.Debugger
{
public partial class frmApuViewer : BaseForm
{
public frmApuViewer()
{
InitializeComponent();
if(LicenseManager.UsageMode != LicenseUsageMode.Designtime) {
tmrUpdate.Start();
}
}
private void tmrUpdate_Tick(object sender, EventArgs e)
{
ApuState state = new ApuState();
InteropEmu.DebugGetApuState(ref state);
ctrlSquareInfo1.ProcessState(ref state.Square1);
ctrlSquareInfo2.ProcessState(ref state.Square2);
ctrlTriangleInfo.ProcessState(ref state.Triangle);
ctrlNoiseInfo.ProcessState(ref state.Noise);
ctrlDmcInfo.ProcessState(ref state.Dmc);
ctrlFrameCounterInfo.ProcessState(ref state.FrameCounter);
}
}
}

View file

@ -0,0 +1,126 @@
<?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="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="tmrUpdate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>107, 17</value>
</metadata>
</root>

View file

@ -143,9 +143,10 @@ namespace Mesen.GUI.Debugger
this.mnuLoadCdlFile = new System.Windows.Forms.ToolStripMenuItem();
this.mnuSaveAsCdlFile = new System.Windows.Forms.ToolStripMenuItem();
this.mnuResetCdlLog = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator();
this.mnuCdlGenerateRom = new System.Windows.Forms.ToolStripMenuItem();
this.mnuCdlStripUsedData = new System.Windows.Forms.ToolStripMenuItem();
this.mnuCdlStripUnusedData = new System.Windows.Forms.ToolStripMenuItem();
this.mnuCdlStripUsedData = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip = new System.Windows.Forms.StatusStrip();
this.lblPrgAnalysis = new System.Windows.Forms.ToolStripStatusLabel();
this.lblPrgAnalysisResult = new System.Windows.Forms.ToolStripStatusLabel();
@ -156,7 +157,7 @@ namespace Mesen.GUI.Debugger
this.lblCyclesElapsed = new System.Windows.Forms.ToolStripStatusLabel();
this.ctrlPpuMemoryMapping = new Mesen.GUI.Debugger.Controls.ctrlMemoryMapping();
this.ctrlCpuMemoryMapping = new Mesen.GUI.Debugger.Controls.ctrlMemoryMapping();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator();
this.mnuApuViewer = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
this.splitContainer.Panel1.SuspendLayout();
this.splitContainer.Panel2.SuspendLayout();
@ -226,7 +227,7 @@ namespace Mesen.GUI.Debugger
this.ctrlSplitContainerTop.Panel2.Controls.Add(this.tlpFunctionLabelLists);
this.ctrlSplitContainerTop.Panel2MinSize = 150;
this.ctrlSplitContainerTop.Size = new System.Drawing.Size(1172, 400);
this.ctrlSplitContainerTop.SplitterDistance = 860;
this.ctrlSplitContainerTop.SplitterDistance = 857;
this.ctrlSplitContainerTop.SplitterWidth = 7;
this.ctrlSplitContainerTop.TabIndex = 3;
this.ctrlSplitContainerTop.PanelCollapsed += new System.EventHandler(this.ctrlSplitContainerTop_PanelCollapsed);
@ -247,7 +248,7 @@ namespace Mesen.GUI.Debugger
this.tlpTop.Name = "tlpTop";
this.tlpTop.RowCount = 1;
this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpTop.Size = new System.Drawing.Size(860, 400);
this.tlpTop.Size = new System.Drawing.Size(857, 400);
this.tlpTop.TabIndex = 2;
//
// ctrlDebuggerCode
@ -256,7 +257,7 @@ namespace Mesen.GUI.Debugger
this.ctrlDebuggerCode.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlDebuggerCode.Location = new System.Drawing.Point(3, 3);
this.ctrlDebuggerCode.Name = "ctrlDebuggerCode";
this.ctrlDebuggerCode.Size = new System.Drawing.Size(396, 394);
this.ctrlDebuggerCode.Size = new System.Drawing.Size(393, 394);
this.ctrlDebuggerCode.TabIndex = 2;
this.ctrlDebuggerCode.OnEditCode += new Mesen.GUI.Debugger.ctrlDebuggerCode.AssemblerEventHandler(this.ctrlDebuggerCode_OnEditCode);
this.ctrlDebuggerCode.OnSetNextStatement += new Mesen.GUI.Debugger.ctrlDebuggerCode.AddressEventHandler(this.ctrlDebuggerCode_OnSetNextStatement);
@ -265,7 +266,7 @@ namespace Mesen.GUI.Debugger
// ctrlConsoleStatus
//
this.ctrlConsoleStatus.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlConsoleStatus.Location = new System.Drawing.Point(402, 0);
this.ctrlConsoleStatus.Location = new System.Drawing.Point(399, 0);
this.ctrlConsoleStatus.Margin = new System.Windows.Forms.Padding(0);
this.ctrlConsoleStatus.Name = "ctrlConsoleStatus";
this.ctrlConsoleStatus.Size = new System.Drawing.Size(458, 400);
@ -276,7 +277,7 @@ namespace Mesen.GUI.Debugger
//
this.ctrlDebuggerCodeSplit.Code = null;
this.ctrlDebuggerCodeSplit.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlDebuggerCodeSplit.Location = new System.Drawing.Point(405, 3);
this.ctrlDebuggerCodeSplit.Location = new System.Drawing.Point(402, 3);
this.ctrlDebuggerCodeSplit.Name = "ctrlDebuggerCodeSplit";
this.ctrlDebuggerCodeSplit.Size = new System.Drawing.Size(1, 394);
this.ctrlDebuggerCodeSplit.TabIndex = 4;
@ -298,7 +299,7 @@ namespace Mesen.GUI.Debugger
this.tlpFunctionLabelLists.RowCount = 2;
this.tlpFunctionLabelLists.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpFunctionLabelLists.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpFunctionLabelLists.Size = new System.Drawing.Size(305, 400);
this.tlpFunctionLabelLists.Size = new System.Drawing.Size(308, 400);
this.tlpFunctionLabelLists.TabIndex = 5;
//
// grpLabels
@ -307,7 +308,7 @@ namespace Mesen.GUI.Debugger
this.grpLabels.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpLabels.Location = new System.Drawing.Point(3, 203);
this.grpLabels.Name = "grpLabels";
this.grpLabels.Size = new System.Drawing.Size(299, 194);
this.grpLabels.Size = new System.Drawing.Size(302, 194);
this.grpLabels.TabIndex = 6;
this.grpLabels.TabStop = false;
this.grpLabels.Text = "Labels";
@ -317,7 +318,7 @@ namespace Mesen.GUI.Debugger
this.ctrlLabelList.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlLabelList.Location = new System.Drawing.Point(3, 16);
this.ctrlLabelList.Name = "ctrlLabelList";
this.ctrlLabelList.Size = new System.Drawing.Size(293, 175);
this.ctrlLabelList.Size = new System.Drawing.Size(296, 175);
this.ctrlLabelList.TabIndex = 0;
this.ctrlLabelList.OnFindOccurrence += new System.EventHandler(this.ctrlLabelList_OnFindOccurrence);
this.ctrlLabelList.OnLabelSelected += new System.EventHandler(this.ctrlLabelList_OnLabelSelected);
@ -328,7 +329,7 @@ namespace Mesen.GUI.Debugger
this.grpFunctions.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpFunctions.Location = new System.Drawing.Point(3, 3);
this.grpFunctions.Name = "grpFunctions";
this.grpFunctions.Size = new System.Drawing.Size(299, 194);
this.grpFunctions.Size = new System.Drawing.Size(302, 194);
this.grpFunctions.TabIndex = 5;
this.grpFunctions.TabStop = false;
this.grpFunctions.Text = "Functions";
@ -338,7 +339,7 @@ namespace Mesen.GUI.Debugger
this.ctrlFunctionList.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlFunctionList.Location = new System.Drawing.Point(3, 16);
this.ctrlFunctionList.Name = "ctrlFunctionList";
this.ctrlFunctionList.Size = new System.Drawing.Size(293, 175);
this.ctrlFunctionList.Size = new System.Drawing.Size(296, 175);
this.ctrlFunctionList.TabIndex = 0;
this.ctrlFunctionList.OnFindOccurrence += new System.EventHandler(this.ctrlFunctionList_OnFindOccurrence);
this.ctrlFunctionList.OnFunctionSelected += new System.EventHandler(this.ctrlFunctionList_OnFunctionSelected);
@ -1101,6 +1102,7 @@ namespace Mesen.GUI.Debugger
// toolsToolStripMenuItem
//
this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.mnuApuViewer,
this.mnuAssembler,
this.mnuMemoryViewer,
this.mnuPpuViewer,
@ -1229,6 +1231,11 @@ namespace Mesen.GUI.Debugger
this.mnuResetCdlLog.Text = "Reset log";
this.mnuResetCdlLog.Click += new System.EventHandler(this.mnuResetCdlLog_Click);
//
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(190, 6);
//
// mnuCdlGenerateRom
//
this.mnuCdlGenerateRom.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -1239,13 +1246,6 @@ namespace Mesen.GUI.Debugger
this.mnuCdlGenerateRom.Size = new System.Drawing.Size(193, 22);
this.mnuCdlGenerateRom.Text = "Generate ROM";
//
// mnuCdlStripUsedData
//
this.mnuCdlStripUsedData.Name = "mnuCdlStripUsedData";
this.mnuCdlStripUsedData.Size = new System.Drawing.Size(166, 22);
this.mnuCdlStripUsedData.Text = "Strip used data";
this.mnuCdlStripUsedData.Click += new System.EventHandler(this.mnuCdlStripUsedData_Click);
//
// mnuCdlStripUnusedData
//
this.mnuCdlStripUnusedData.Name = "mnuCdlStripUnusedData";
@ -1253,6 +1253,13 @@ namespace Mesen.GUI.Debugger
this.mnuCdlStripUnusedData.Text = "Strip unused data";
this.mnuCdlStripUnusedData.Click += new System.EventHandler(this.mnuCdlStripUnusedData_Click);
//
// mnuCdlStripUsedData
//
this.mnuCdlStripUsedData.Name = "mnuCdlStripUsedData";
this.mnuCdlStripUsedData.Size = new System.Drawing.Size(166, 22);
this.mnuCdlStripUsedData.Text = "Strip used data";
this.mnuCdlStripUsedData.Click += new System.EventHandler(this.mnuCdlStripUsedData_Click);
//
// statusStrip
//
this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -1335,10 +1342,13 @@ namespace Mesen.GUI.Debugger
this.ctrlCpuMemoryMapping.Text = "ctrlMemoryMapping1";
this.ctrlCpuMemoryMapping.Visible = false;
//
// toolStripMenuItem5
// mnuApuViewer
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(190, 6);
this.mnuApuViewer.Image = global::Mesen.GUI.Properties.Resources.Audio;
this.mnuApuViewer.Name = "mnuApuViewer";
this.mnuApuViewer.Size = new System.Drawing.Size(195, 22);
this.mnuApuViewer.Text = "APU Viewer";
this.mnuApuViewer.Click += new System.EventHandler(this.mnuApuViewer_Click);
//
// frmDebugger
//
@ -1509,5 +1519,6 @@ namespace Mesen.GUI.Debugger
private System.Windows.Forms.ToolStripMenuItem mnuRevertChanges;
private System.Windows.Forms.ToolStripMenuItem mnuScriptWindow;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem5;
private System.Windows.Forms.ToolStripMenuItem mnuApuViewer;
}
}

View file

@ -588,6 +588,11 @@ namespace Mesen.GUI.Debugger
DebugWindowManager.OpenDebugWindow(DebugWindow.PpuViewer);
}
private void mnuApuViewer_Click(object sender, EventArgs e)
{
DebugWindowManager.OpenDebugWindow(DebugWindow.ApuViewer);
}
private void ctrlCallstack_FunctionSelected(object sender, EventArgs e)
{
_lastCodeWindow.ScrollToLineNumber((int)sender);

View file

@ -84,8 +84,9 @@ namespace Mesen.GUI.Forms.Config
EmulatorShortcut.OpenFile,
EmulatorShortcut.OpenDebugger,
EmulatorShortcut.OpenAssembler,
EmulatorShortcut.OpenPpuViewer,
EmulatorShortcut.OpenApuViewer,
EmulatorShortcut.OpenMemoryTools,
EmulatorShortcut.OpenPpuViewer,
EmulatorShortcut.OpenScriptWindow,
EmulatorShortcut.OpenTraceLogger,

View file

@ -202,6 +202,7 @@ namespace Mesen.GUI.Forms
this.mnuReportBug = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator();
this.mnuAbout = new System.Windows.Forms.ToolStripMenuItem();
this.mnuApuViewer = new System.Windows.Forms.ToolStripMenuItem();
this.panelRenderer.SuspendLayout();
this.panelInfo.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picIcon)).BeginInit();
@ -344,49 +345,49 @@ namespace Mesen.GUI.Forms
//
this.mnuOpen.Image = global::Mesen.GUI.Properties.Resources.FolderOpen;
this.mnuOpen.Name = "mnuOpen";
this.mnuOpen.Size = new System.Drawing.Size(152, 22);
this.mnuOpen.Size = new System.Drawing.Size(136, 22);
this.mnuOpen.Text = "Open";
//
// toolStripMenuItem4
//
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(149, 6);
this.toolStripMenuItem4.Size = new System.Drawing.Size(133, 6);
//
// mnuSaveState
//
this.mnuSaveState.Name = "mnuSaveState";
this.mnuSaveState.Size = new System.Drawing.Size(152, 22);
this.mnuSaveState.Size = new System.Drawing.Size(136, 22);
this.mnuSaveState.Text = "Save State";
this.mnuSaveState.DropDownOpening += new System.EventHandler(this.mnuSaveState_DropDownOpening);
//
// mnuLoadState
//
this.mnuLoadState.Name = "mnuLoadState";
this.mnuLoadState.Size = new System.Drawing.Size(152, 22);
this.mnuLoadState.Size = new System.Drawing.Size(136, 22);
this.mnuLoadState.Text = "Load State";
this.mnuLoadState.DropDownOpening += new System.EventHandler(this.mnuLoadState_DropDownOpening);
//
// toolStripMenuItem7
//
this.toolStripMenuItem7.Name = "toolStripMenuItem7";
this.toolStripMenuItem7.Size = new System.Drawing.Size(149, 6);
this.toolStripMenuItem7.Size = new System.Drawing.Size(133, 6);
//
// mnuRecentFiles
//
this.mnuRecentFiles.Name = "mnuRecentFiles";
this.mnuRecentFiles.Size = new System.Drawing.Size(152, 22);
this.mnuRecentFiles.Size = new System.Drawing.Size(136, 22);
this.mnuRecentFiles.Text = "Recent Files";
//
// toolStripMenuItem6
//
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
this.toolStripMenuItem6.Size = new System.Drawing.Size(149, 6);
this.toolStripMenuItem6.Size = new System.Drawing.Size(133, 6);
//
// mnuExit
//
this.mnuExit.Image = global::Mesen.GUI.Properties.Resources.Exit;
this.mnuExit.Name = "mnuExit";
this.mnuExit.Size = new System.Drawing.Size(152, 22);
this.mnuExit.Size = new System.Drawing.Size(136, 22);
this.mnuExit.Text = "Exit";
//
// mnuGame
@ -588,7 +589,7 @@ namespace Mesen.GUI.Forms
this.mnuShowFPS});
this.mnuEmulationSpeed.Image = global::Mesen.GUI.Properties.Resources.Speed;
this.mnuEmulationSpeed.Name = "mnuEmulationSpeed";
this.mnuEmulationSpeed.Size = new System.Drawing.Size(152, 22);
this.mnuEmulationSpeed.Size = new System.Drawing.Size(135, 22);
this.mnuEmulationSpeed.Text = "Speed";
this.mnuEmulationSpeed.DropDownOpening += new System.EventHandler(this.mnuEmulationSpeed_DropDownOpening);
//
@ -682,7 +683,7 @@ namespace Mesen.GUI.Forms
this.mnuFullscreen});
this.mnuVideoScale.Image = global::Mesen.GUI.Properties.Resources.Fullscreen;
this.mnuVideoScale.Name = "mnuVideoScale";
this.mnuVideoScale.Size = new System.Drawing.Size(152, 22);
this.mnuVideoScale.Size = new System.Drawing.Size(135, 22);
this.mnuVideoScale.Text = "Video Size";
//
// mnuScale1x
@ -770,7 +771,7 @@ namespace Mesen.GUI.Forms
this.mnuBilinearInterpolation});
this.mnuVideoFilter.Image = global::Mesen.GUI.Properties.Resources.VideoFilter;
this.mnuVideoFilter.Name = "mnuVideoFilter";
this.mnuVideoFilter.Size = new System.Drawing.Size(152, 22);
this.mnuVideoFilter.Size = new System.Drawing.Size(135, 22);
this.mnuVideoFilter.Text = "Video Filter";
//
// mnuNoneFilter
@ -1000,7 +1001,7 @@ namespace Mesen.GUI.Forms
this.mnuRegionDendy});
this.mnuRegion.Image = global::Mesen.GUI.Properties.Resources.Globe;
this.mnuRegion.Name = "mnuRegion";
this.mnuRegion.Size = new System.Drawing.Size(152, 22);
this.mnuRegion.Size = new System.Drawing.Size(135, 22);
this.mnuRegion.Text = "Region";
//
// mnuRegionAuto
@ -1034,13 +1035,13 @@ namespace Mesen.GUI.Forms
// toolStripMenuItem10
//
this.toolStripMenuItem10.Name = "toolStripMenuItem10";
this.toolStripMenuItem10.Size = new System.Drawing.Size(149, 6);
this.toolStripMenuItem10.Size = new System.Drawing.Size(132, 6);
//
// mnuAudioConfig
//
this.mnuAudioConfig.Image = global::Mesen.GUI.Properties.Resources.Audio;
this.mnuAudioConfig.Name = "mnuAudioConfig";
this.mnuAudioConfig.Size = new System.Drawing.Size(152, 22);
this.mnuAudioConfig.Size = new System.Drawing.Size(135, 22);
this.mnuAudioConfig.Text = "Audio";
this.mnuAudioConfig.Click += new System.EventHandler(this.mnuAudioConfig_Click);
//
@ -1048,7 +1049,7 @@ namespace Mesen.GUI.Forms
//
this.mnuInput.Image = global::Mesen.GUI.Properties.Resources.Controller;
this.mnuInput.Name = "mnuInput";
this.mnuInput.Size = new System.Drawing.Size(152, 22);
this.mnuInput.Size = new System.Drawing.Size(135, 22);
this.mnuInput.Text = "Input";
this.mnuInput.Click += new System.EventHandler(this.mnuInput_Click);
//
@ -1056,7 +1057,7 @@ namespace Mesen.GUI.Forms
//
this.mnuVideoConfig.Image = global::Mesen.GUI.Properties.Resources.Video;
this.mnuVideoConfig.Name = "mnuVideoConfig";
this.mnuVideoConfig.Size = new System.Drawing.Size(152, 22);
this.mnuVideoConfig.Size = new System.Drawing.Size(135, 22);
this.mnuVideoConfig.Text = "Video";
this.mnuVideoConfig.Click += new System.EventHandler(this.mnuVideoConfig_Click);
//
@ -1064,20 +1065,20 @@ namespace Mesen.GUI.Forms
//
this.mnuEmulationConfig.Image = global::Mesen.GUI.Properties.Resources.DipSwitches;
this.mnuEmulationConfig.Name = "mnuEmulationConfig";
this.mnuEmulationConfig.Size = new System.Drawing.Size(152, 22);
this.mnuEmulationConfig.Size = new System.Drawing.Size(135, 22);
this.mnuEmulationConfig.Text = "Emulation";
this.mnuEmulationConfig.Click += new System.EventHandler(this.mnuEmulationConfig_Click);
//
// toolStripMenuItem11
//
this.toolStripMenuItem11.Name = "toolStripMenuItem11";
this.toolStripMenuItem11.Size = new System.Drawing.Size(149, 6);
this.toolStripMenuItem11.Size = new System.Drawing.Size(132, 6);
//
// mnuPreferences
//
this.mnuPreferences.Image = global::Mesen.GUI.Properties.Resources.Cog;
this.mnuPreferences.Name = "mnuPreferences";
this.mnuPreferences.Size = new System.Drawing.Size(152, 22);
this.mnuPreferences.Size = new System.Drawing.Size(135, 22);
this.mnuPreferences.Text = "Preferences";
this.mnuPreferences.Click += new System.EventHandler(this.mnuPreferences_Click);
//
@ -1448,6 +1449,7 @@ namespace Mesen.GUI.Forms
// mnuDebug
//
this.mnuDebug.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.mnuApuViewer,
this.mnuAssembler,
this.mnuDebugDebugger,
this.mnuMemoryViewer,
@ -1586,6 +1588,13 @@ namespace Mesen.GUI.Forms
this.mnuAbout.Text = "About";
this.mnuAbout.Click += new System.EventHandler(this.mnuAbout_Click);
//
// mnuApuViewer
//
this.mnuApuViewer.Image = global::Mesen.GUI.Properties.Resources.Audio;
this.mnuApuViewer.Name = "mnuApuViewer";
this.mnuApuViewer.Size = new System.Drawing.Size(162, 22);
this.mnuApuViewer.Text = "APU Viewer";
//
// frmMain
//
this.AllowDrop = true;
@ -1786,6 +1795,7 @@ namespace Mesen.GUI.Forms
private System.Windows.Forms.ToolStripMenuItem mnuLoadTapeFile;
private System.Windows.Forms.ToolStripMenuItem mnuStartRecordTapeFile;
private System.Windows.Forms.ToolStripMenuItem mnuStopRecordTapeFile;
private System.Windows.Forms.ToolStripMenuItem mnuApuViewer;
}
}

View file

@ -664,6 +664,7 @@ namespace Mesen.GUI.Forms
BindShortcut(mnuDebugDebugger, EmulatorShortcut.OpenDebugger, runningNotClient);
BindShortcut(mnuDebugger, EmulatorShortcut.OpenDebugger, runningNotClient);
BindShortcut(mnuApuViewer, EmulatorShortcut.OpenApuViewer, runningNotClient);
BindShortcut(mnuAssembler, EmulatorShortcut.OpenAssembler, runningNotClient);
BindShortcut(mnuMemoryViewer, EmulatorShortcut.OpenMemoryTools, runningNotClient);
BindShortcut(mnuPpuViewer, EmulatorShortcut.OpenPpuViewer, runningNotClient);
@ -762,6 +763,7 @@ namespace Mesen.GUI.Forms
case EmulatorShortcut.TakeScreenshot: InteropEmu.TakeScreenshot(); break;
case EmulatorShortcut.LoadRandomGame: LoadRandomGame(); break;
case EmulatorShortcut.OpenApuViewer: DebugWindowManager.OpenDebugWindow(DebugWindow.ApuViewer); break;
case EmulatorShortcut.OpenAssembler: DebugWindowManager.OpenDebugWindow(DebugWindow.Assembler); break;
case EmulatorShortcut.OpenDebugger: DebugWindowManager.OpenDebugWindow(DebugWindow.Debugger); break;
case EmulatorShortcut.OpenTraceLogger: DebugWindowManager.OpenDebugWindow(DebugWindow.TraceLogger); break;

View file

@ -289,6 +289,42 @@
<Compile Include="Debugger\BreakpointManager.cs" />
<Compile Include="Debugger\ChrByteColorProvider.cs" />
<Compile Include="Debugger\ByteColorProvider.cs" />
<Compile Include="Debugger\Controls\ApuViewer\ctrlEnvelopeInfo.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlEnvelopeInfo.Designer.cs">
<DependentUpon>ctrlEnvelopeInfo.cs</DependentUpon>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlLengthCounterInfo.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlLengthCounterInfo.Designer.cs">
<DependentUpon>ctrlLengthCounterInfo.cs</DependentUpon>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlDmcInfo.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlDmcInfo.Designer.cs">
<DependentUpon>ctrlDmcInfo.cs</DependentUpon>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlFrameCounterInfo.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlFrameCounterInfo.Designer.cs">
<DependentUpon>ctrlFrameCounterInfo.cs</DependentUpon>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlNoiseInfo.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlNoiseInfo.Designer.cs">
<DependentUpon>ctrlNoiseInfo.cs</DependentUpon>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlTriangleInfo.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlTriangleInfo.Designer.cs">
<DependentUpon>ctrlTriangleInfo.cs</DependentUpon>
</Compile>
<Compile Include="Debugger\Controls\BaseScrollableTextboxUserControl.cs">
<SubType>UserControl</SubType>
</Compile>
@ -386,6 +422,12 @@
<Compile Include="Debugger\Controls\ctrlScrollableTextbox.designer.cs">
<DependentUpon>ctrlScrollableTextbox.cs</DependentUpon>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlSquareInfo.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Debugger\Controls\ApuViewer\ctrlSquareInfo.Designer.cs">
<DependentUpon>ctrlSquareInfo.cs</DependentUpon>
</Compile>
<Compile Include="Debugger\Controls\ctrlTextbox.cs" />
<Compile Include="Debugger\Controls\ctrlTextbox.Designer.cs">
<DependentUpon>ctrlTextbox.cs</DependentUpon>
@ -480,6 +522,12 @@
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Debugger\FastColoredTextBox\VisualMarker.cs" />
<Compile Include="Debugger\frmApuViewer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Debugger\frmApuViewer.Designer.cs">
<DependentUpon>frmApuViewer.cs</DependentUpon>
</Compile>
<Compile Include="Debugger\frmAssembler.cs">
<SubType>Form</SubType>
</Compile>
@ -994,6 +1042,27 @@
<EmbeddedResource Include="Controls\MesenNumericUpDown.resx">
<DependentUpon>MesenNumericUpDown.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Debugger\Controls\ApuViewer\ctrlEnvelopeInfo.resx">
<DependentUpon>ctrlEnvelopeInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Debugger\Controls\ApuViewer\ctrlLengthCounterInfo.resx">
<DependentUpon>ctrlLengthCounterInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Debugger\Controls\ApuViewer\ctrlDmcInfo.resx">
<DependentUpon>ctrlDmcInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Debugger\Controls\ApuViewer\ctrlFrameCounterInfo.resx">
<DependentUpon>ctrlFrameCounterInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Debugger\Controls\ApuViewer\ctrlNoiseInfo.resx">
<DependentUpon>ctrlNoiseInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Debugger\Controls\ApuViewer\ctrlTriangleInfo.resx">
<DependentUpon>ctrlTriangleInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Debugger\Controls\ApuViewer\ctrlSquareInfo.resx">
<DependentUpon>ctrlSquareInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Debugger\Example.lua" />
<None Include="Resources\PipetteSmall.png" />
<None Include="Resources\Enum.png" />
@ -1104,6 +1173,9 @@
<EmbeddedResource Include="Debugger\FastColoredTextBox\ReplaceForm.resx">
<DependentUpon>ReplaceForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Debugger\frmApuViewer.resx">
<DependentUpon>frmApuViewer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Debugger\frmAssembler.resx">
<DependentUpon>frmAssembler.cs</DependentUpon>
</EmbeddedResource>

View file

@ -202,6 +202,7 @@ namespace Mesen.GUI
[DllImport(DLLPath)] public static extern void DebugRelease();
[DllImport(DLLPath)] public static extern void DebugSetFlags(DebuggerFlags flags);
[DllImport(DLLPath)] public static extern void DebugGetState(ref DebugState state);
[DllImport(DLLPath)] public static extern void DebugGetApuState(ref ApuState state);
[DllImport(DLLPath)] public static extern void DebugSetState(DebugState state);
[DllImport(DLLPath)] public static extern void DebugSetBreakpoints([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)]InteropBreakpoint[] breakpoints, UInt32 length);
[DllImport(DLLPath)] public static extern void DebugSetLabel(UInt32 address, AddressType addressType, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string label, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string comment);
@ -1205,6 +1206,7 @@ namespace Mesen.GUI
public Byte Duty;
public Byte DutyPosition;
public UInt16 Period;
public UInt16 Timer;
[MarshalAs(UnmanagedType.I1)]
public bool SweepEnabled;
@ -1225,6 +1227,7 @@ namespace Mesen.GUI
public struct ApuTriangleState
{
public UInt16 Period;
public UInt16 Timer;
public Byte SequencePosition;
[MarshalAs(UnmanagedType.I1)]
@ -1238,6 +1241,7 @@ namespace Mesen.GUI
public struct ApuNoiseState
{
public UInt16 Period;
public UInt16 Timer;
public UInt16 ShiftRegister;
[MarshalAs(UnmanagedType.I1)]
public bool ModeFlag;
@ -1253,6 +1257,7 @@ namespace Mesen.GUI
public struct ApuDmcState
{
public double SampleRate;
public UInt16 SampleAddr;
public UInt16 SampleLength;
@ -1261,9 +1266,9 @@ namespace Mesen.GUI
[MarshalAs(UnmanagedType.I1)]
public bool IrqEnabled;
public UInt16 Period;
public UInt16 Timer;
public UInt16 BytesRemaining;
public double SampleRate;
public Byte OutputVolume;
}
@ -1635,6 +1640,7 @@ namespace Mesen.GUI
OpenMemoryTools,
OpenScriptWindow,
OpenTraceLogger,
OpenApuViewer,
}
public struct InteropCheatInfo

View file

@ -35,6 +35,7 @@ extern "C"
DllExport void __stdcall DebugGetState(DebugState *state) { GetDebugger()->GetState(state); }
DllExport void __stdcall DebugSetState(DebugState state) { GetDebugger()->SetState(state); }
DllExport void __stdcall DebugGetApuState(ApuState *state) { GetDebugger()->GetApuState(state); }
DllExport void __stdcall DebugSetBreakpoints(Breakpoint breakpoints[], uint32_t length) { GetDebugger()->SetBreakpoints(breakpoints, length); }
DllExport void __stdcall DebugSetLabel(uint32_t address, AddressType addressType, char* label, char* comment) { GetDebugger()->GetLabelManager()->SetLabel(address, addressType, label, comment); }