NES - sound config dialog for toggling sound channels
This commit is contained in:
parent
f5a7dc2191
commit
0834c63a43
|
@ -21,6 +21,13 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
public static bool CFG_USE_METASPU = true;
|
||||
public static bool CFG_DECLICK = true;
|
||||
|
||||
public bool EnableSquare1 = false;
|
||||
public bool EnableSquare2 = false;
|
||||
public bool EnableTriangle = true;
|
||||
public bool EnableNoise = false;
|
||||
public bool EnableDMC = true;
|
||||
|
||||
|
||||
NES nes;
|
||||
public APU(NES nes)
|
||||
{
|
||||
|
@ -929,11 +936,11 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
dmc.Run();
|
||||
|
||||
int mix = 0;
|
||||
mix += pulse[0].sample;
|
||||
mix += pulse[1].sample;
|
||||
mix += triangle.sample;
|
||||
mix += noise.sample >> 1;
|
||||
mix += dmc.sample;
|
||||
if (EnableSquare1) mix += pulse[0].sample;
|
||||
if (EnableSquare2) mix += pulse[1].sample;
|
||||
if (EnableTriangle) mix += triangle.sample;
|
||||
if (EnableNoise) mix += noise.sample >> 1;
|
||||
if (EnableDMC) mix += dmc.sample;
|
||||
|
||||
EmitSample(mix);
|
||||
|
||||
|
|
|
@ -33,6 +33,13 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
int[,] palette = new int[64,3];
|
||||
int[] palette_compiled = new int[64*8];
|
||||
IPortDevice[] ports;
|
||||
|
||||
//Sound config
|
||||
public void SetSquare1(bool enabled) { apu.EnableSquare1 = enabled; }
|
||||
public void SetSquare2(bool enabled) { apu.EnableSquare2 = enabled; }
|
||||
public void SetTriangle(bool enabled) { apu.EnableTriangle = enabled; }
|
||||
public void SetNoise(bool enabled) { apu.EnableNoise = enabled; }
|
||||
public void SetDMC(bool enabled) { apu.EnableDMC = enabled; }
|
||||
|
||||
public void HardReset()
|
||||
{
|
||||
|
|
|
@ -288,6 +288,12 @@
|
|||
<Compile Include="NEStools\NESPPU.Designer.cs">
|
||||
<DependentUpon>NESPPU.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NEStools\NESSoundConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="NEStools\NESSoundConfig.Designer.cs">
|
||||
<DependentUpon>NESSoundConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NEStools\PaletteViewer.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
@ -370,6 +376,9 @@
|
|||
<DependentUpon>NameStateForm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="NEStools\NESSoundConfig.resx">
|
||||
<DependentUpon>NESSoundConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PCEtools\PCEBGViewer.resx">
|
||||
<DependentUpon>PCEBGViewer.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -490,6 +490,13 @@ namespace BizHawk.MultiClient
|
|||
public string IncreaseWindowSize = "Alt+UpArrow";
|
||||
public string DecreaseWindowSize = "Alt+DownArrow";
|
||||
|
||||
// NES Sound settings
|
||||
public bool NESEnableSquare1 = true;
|
||||
public bool NESEnableSquare2 = true;
|
||||
public bool NESEnableTriangle = true;
|
||||
public bool NESEnableNoise = true;
|
||||
public bool NESEnableDMC = true;
|
||||
|
||||
// SMS / GameGear Settings
|
||||
public bool SmsEnableFM = true;
|
||||
public bool SmsAllowOverlock = false;
|
||||
|
|
|
@ -150,6 +150,7 @@
|
|||
this.runInBackgroundToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.acceptBackgroundInputToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.singleInstanceModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.neverBeAskedToSaveChangesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator23 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.logWindowAsConsoleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.frameSkipToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -262,7 +263,7 @@
|
|||
this.cmiScreenshotClipboard = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmiCloseRom = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmiShowMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.neverBeAskedToSaveChangesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.soundChannelsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.StatusSlot0.SuspendLayout();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
|
@ -1159,7 +1160,7 @@
|
|||
//
|
||||
this.controllersToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.GameController;
|
||||
this.controllersToolStripMenuItem.Name = "controllersToolStripMenuItem";
|
||||
this.controllersToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.controllersToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
||||
this.controllersToolStripMenuItem.Text = "&Controllers...";
|
||||
this.controllersToolStripMenuItem.Click += new System.EventHandler(this.controllersToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -1167,7 +1168,7 @@
|
|||
//
|
||||
this.hotkeysToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.HotKeys;
|
||||
this.hotkeysToolStripMenuItem.Name = "hotkeysToolStripMenuItem";
|
||||
this.hotkeysToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.hotkeysToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
||||
this.hotkeysToolStripMenuItem.Text = "&Hotkeys...";
|
||||
this.hotkeysToolStripMenuItem.Click += new System.EventHandler(this.hotkeysToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -1175,7 +1176,7 @@
|
|||
//
|
||||
this.messagesToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MessageConfig;
|
||||
this.messagesToolStripMenuItem.Name = "messagesToolStripMenuItem";
|
||||
this.messagesToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.messagesToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
||||
this.messagesToolStripMenuItem.Text = "&Messages...";
|
||||
this.messagesToolStripMenuItem.Click += new System.EventHandler(this.messagesToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -1183,7 +1184,7 @@
|
|||
//
|
||||
this.pathsToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.CopyFolderHS;
|
||||
this.pathsToolStripMenuItem.Name = "pathsToolStripMenuItem";
|
||||
this.pathsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.pathsToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
||||
this.pathsToolStripMenuItem.Text = "Paths...";
|
||||
this.pathsToolStripMenuItem.Click += new System.EventHandler(this.pathsToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -1191,7 +1192,7 @@
|
|||
//
|
||||
this.soundToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.AudioHS;
|
||||
this.soundToolStripMenuItem.Name = "soundToolStripMenuItem";
|
||||
this.soundToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.soundToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
||||
this.soundToolStripMenuItem.Text = "&Sound...";
|
||||
this.soundToolStripMenuItem.Click += new System.EventHandler(this.soundToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -1199,14 +1200,14 @@
|
|||
//
|
||||
this.autofireToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Lightning;
|
||||
this.autofireToolStripMenuItem.Name = "autofireToolStripMenuItem";
|
||||
this.autofireToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.autofireToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
||||
this.autofireToolStripMenuItem.Text = "&Autofire...";
|
||||
this.autofireToolStripMenuItem.Click += new System.EventHandler(this.autofireToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator9
|
||||
//
|
||||
this.toolStripSeparator9.Name = "toolStripSeparator9";
|
||||
this.toolStripSeparator9.Size = new System.Drawing.Size(149, 6);
|
||||
this.toolStripSeparator9.Size = new System.Drawing.Size(138, 6);
|
||||
//
|
||||
// enableToolStripMenuItem
|
||||
//
|
||||
|
@ -1217,7 +1218,7 @@
|
|||
this.autoSavestatesToolStripMenuItem,
|
||||
this.saveScreenshotWithSavestatesToolStripMenuItem});
|
||||
this.enableToolStripMenuItem.Name = "enableToolStripMenuItem";
|
||||
this.enableToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.enableToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
||||
this.enableToolStripMenuItem.Text = "&Enable";
|
||||
this.enableToolStripMenuItem.DropDownOpened += new System.EventHandler(this.enableToolStripMenuItem_DropDownOpened);
|
||||
//
|
||||
|
@ -1273,7 +1274,7 @@
|
|||
this.toolStripSeparator23,
|
||||
this.logWindowAsConsoleToolStripMenuItem});
|
||||
this.gUIToolStripMenuItem.Name = "gUIToolStripMenuItem";
|
||||
this.gUIToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.gUIToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
||||
this.gUIToolStripMenuItem.Text = "GUI";
|
||||
this.gUIToolStripMenuItem.DropDownOpened += new System.EventHandler(this.gUIToolStripMenuItem_DropDownOpened);
|
||||
//
|
||||
|
@ -1345,6 +1346,13 @@
|
|||
this.singleInstanceModeToolStripMenuItem.Text = "Single Instance Mode";
|
||||
this.singleInstanceModeToolStripMenuItem.Click += new System.EventHandler(this.singleInstanceModeToolStripMenuItem_Click);
|
||||
//
|
||||
// neverBeAskedToSaveChangesToolStripMenuItem
|
||||
//
|
||||
this.neverBeAskedToSaveChangesToolStripMenuItem.Name = "neverBeAskedToSaveChangesToolStripMenuItem";
|
||||
this.neverBeAskedToSaveChangesToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||
this.neverBeAskedToSaveChangesToolStripMenuItem.Text = "Never be asked to save changes";
|
||||
this.neverBeAskedToSaveChangesToolStripMenuItem.Click += new System.EventHandler(this.neverBeAskedToSaveChangesToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator23
|
||||
//
|
||||
this.toolStripSeparator23.Name = "toolStripSeparator23";
|
||||
|
@ -1381,7 +1389,7 @@
|
|||
this.miSpeed150,
|
||||
this.miSpeed200});
|
||||
this.frameSkipToolStripMenuItem.Name = "frameSkipToolStripMenuItem";
|
||||
this.frameSkipToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.frameSkipToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
||||
this.frameSkipToolStripMenuItem.Text = "Speed/Skip";
|
||||
this.frameSkipToolStripMenuItem.DropDownOpened += new System.EventHandler(this.frameSkipToolStripMenuItem_DropDownOpened);
|
||||
//
|
||||
|
@ -1524,13 +1532,13 @@
|
|||
// toolStripSeparator10
|
||||
//
|
||||
this.toolStripSeparator10.Name = "toolStripSeparator10";
|
||||
this.toolStripSeparator10.Size = new System.Drawing.Size(149, 6);
|
||||
this.toolStripSeparator10.Size = new System.Drawing.Size(138, 6);
|
||||
//
|
||||
// saveConfigToolStripMenuItem
|
||||
//
|
||||
this.saveConfigToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Save;
|
||||
this.saveConfigToolStripMenuItem.Name = "saveConfigToolStripMenuItem";
|
||||
this.saveConfigToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.saveConfigToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
||||
this.saveConfigToolStripMenuItem.Text = "Save Config";
|
||||
this.saveConfigToolStripMenuItem.Click += new System.EventHandler(this.saveConfigToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -1538,7 +1546,7 @@
|
|||
//
|
||||
this.loadConfigToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.LoadConfig;
|
||||
this.loadConfigToolStripMenuItem.Name = "loadConfigToolStripMenuItem";
|
||||
this.loadConfigToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.loadConfigToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
||||
this.loadConfigToolStripMenuItem.Text = "Load Config";
|
||||
//
|
||||
// toolsToolStripMenuItem
|
||||
|
@ -1641,7 +1649,8 @@
|
|||
this.nametableViewerToolStripMenuItem,
|
||||
this.gameGenieCodesToolStripMenuItem,
|
||||
this.toolStripSeparator17,
|
||||
this.graphicsSettingsToolStripMenuItem});
|
||||
this.graphicsSettingsToolStripMenuItem,
|
||||
this.soundChannelsToolStripMenuItem});
|
||||
this.NESToolStripMenuItem.Name = "NESToolStripMenuItem";
|
||||
this.NESToolStripMenuItem.Size = new System.Drawing.Size(40, 19);
|
||||
this.NESToolStripMenuItem.Text = "&NES";
|
||||
|
@ -2249,12 +2258,12 @@
|
|||
this.cmiShowMenu.Text = "Show Menu";
|
||||
this.cmiShowMenu.Click += new System.EventHandler(this.showMenuToolStripMenuItem_Click);
|
||||
//
|
||||
// neverBeAskedToSaveChangesToolStripMenuItem
|
||||
// soundChannelsToolStripMenuItem
|
||||
//
|
||||
this.neverBeAskedToSaveChangesToolStripMenuItem.Name = "neverBeAskedToSaveChangesToolStripMenuItem";
|
||||
this.neverBeAskedToSaveChangesToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||
this.neverBeAskedToSaveChangesToolStripMenuItem.Text = "Never be asked to save changes";
|
||||
this.neverBeAskedToSaveChangesToolStripMenuItem.Click += new System.EventHandler(this.neverBeAskedToSaveChangesToolStripMenuItem_Click);
|
||||
this.soundChannelsToolStripMenuItem.Name = "soundChannelsToolStripMenuItem";
|
||||
this.soundChannelsToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.soundChannelsToolStripMenuItem.Text = "Sound Channels";
|
||||
this.soundChannelsToolStripMenuItem.Click += new System.EventHandler(this.soundChannelsToolStripMenuItem_Click);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
|
@ -2531,6 +2540,7 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem singleInstanceModeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem miSuppressGuiLayer;
|
||||
private System.Windows.Forms.ToolStripMenuItem neverBeAskedToSaveChangesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem soundChannelsToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1320,6 +1320,7 @@ namespace BizHawk.MultiClient
|
|||
NES nes = Global.Emulator as NES;
|
||||
Global.Game.Name = nes.GameName;
|
||||
Global.Game.Status = nes.RomStatus;
|
||||
SetNESSoundChannels();
|
||||
}
|
||||
|
||||
Text = DisplayNameForSystem(game.System) + " - " + game.Name;
|
||||
|
@ -3231,5 +3232,26 @@ namespace BizHawk.MultiClient
|
|||
else newp = 1;
|
||||
SetSpeedPercent(newp);
|
||||
}
|
||||
|
||||
public void SetNESSoundChannels()
|
||||
{
|
||||
NES nes = Global.Emulator as NES;
|
||||
nes.SetSquare1(Global.Config.NESEnableSquare1);
|
||||
nes.SetSquare2(Global.Config.NESEnableSquare2);
|
||||
nes.SetTriangle(Global.Config.NESEnableTriangle);
|
||||
nes.SetNoise(Global.Config.NESEnableNoise);
|
||||
nes.SetDMC(Global.Config.NESEnableDMC);
|
||||
}
|
||||
|
||||
private void soundChannelsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.Emulator is NES)
|
||||
{
|
||||
Global.Sound.StopSound();
|
||||
NESSoundConfig config = new NESSoundConfig();
|
||||
config.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,157 @@
|
|||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class NESSoundConfig
|
||||
{
|
||||
/// <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.OK = new System.Windows.Forms.Button();
|
||||
this.Cancel = new System.Windows.Forms.Button();
|
||||
this.Square1 = new System.Windows.Forms.CheckBox();
|
||||
this.Triangle = new System.Windows.Forms.CheckBox();
|
||||
this.Noise = new System.Windows.Forms.CheckBox();
|
||||
this.Square2 = new System.Windows.Forms.CheckBox();
|
||||
this.DMC = new System.Windows.Forms.CheckBox();
|
||||
this.SelectAll = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// OK
|
||||
//
|
||||
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.OK.Location = new System.Drawing.Point(52, 158);
|
||||
this.OK.Name = "OK";
|
||||
this.OK.Size = new System.Drawing.Size(75, 23);
|
||||
this.OK.TabIndex = 0;
|
||||
this.OK.Text = "&Ok";
|
||||
this.OK.UseVisualStyleBackColor = true;
|
||||
this.OK.Click += new System.EventHandler(this.OK_Click);
|
||||
//
|
||||
// Cancel
|
||||
//
|
||||
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Cancel.Location = new System.Drawing.Point(133, 158);
|
||||
this.Cancel.Name = "Cancel";
|
||||
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.Cancel.TabIndex = 1;
|
||||
this.Cancel.Text = "&Cancel";
|
||||
this.Cancel.UseVisualStyleBackColor = true;
|
||||
this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
|
||||
//
|
||||
// Square1
|
||||
//
|
||||
this.Square1.AutoSize = true;
|
||||
this.Square1.Location = new System.Drawing.Point(12, 12);
|
||||
this.Square1.Name = "Square1";
|
||||
this.Square1.Size = new System.Drawing.Size(69, 17);
|
||||
this.Square1.TabIndex = 2;
|
||||
this.Square1.Text = "Square 1";
|
||||
this.Square1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Triangle
|
||||
//
|
||||
this.Triangle.AutoSize = true;
|
||||
this.Triangle.Location = new System.Drawing.Point(12, 58);
|
||||
this.Triangle.Name = "Triangle";
|
||||
this.Triangle.Size = new System.Drawing.Size(64, 17);
|
||||
this.Triangle.TabIndex = 3;
|
||||
this.Triangle.Text = "Triangle";
|
||||
this.Triangle.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Noise
|
||||
//
|
||||
this.Noise.AutoSize = true;
|
||||
this.Noise.Location = new System.Drawing.Point(12, 81);
|
||||
this.Noise.Name = "Noise";
|
||||
this.Noise.Size = new System.Drawing.Size(53, 17);
|
||||
this.Noise.TabIndex = 5;
|
||||
this.Noise.Text = "Noise";
|
||||
this.Noise.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Square2
|
||||
//
|
||||
this.Square2.AutoSize = true;
|
||||
this.Square2.Location = new System.Drawing.Point(12, 35);
|
||||
this.Square2.Name = "Square2";
|
||||
this.Square2.Size = new System.Drawing.Size(69, 17);
|
||||
this.Square2.TabIndex = 4;
|
||||
this.Square2.Text = "Square 2";
|
||||
this.Square2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// DMC
|
||||
//
|
||||
this.DMC.AutoSize = true;
|
||||
this.DMC.Location = new System.Drawing.Point(12, 104);
|
||||
this.DMC.Name = "DMC";
|
||||
this.DMC.Size = new System.Drawing.Size(50, 17);
|
||||
this.DMC.TabIndex = 6;
|
||||
this.DMC.Text = "DMC";
|
||||
this.DMC.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// SelectAll
|
||||
//
|
||||
this.SelectAll.AutoSize = true;
|
||||
this.SelectAll.Location = new System.Drawing.Point(12, 127);
|
||||
this.SelectAll.Name = "SelectAll";
|
||||
this.SelectAll.Size = new System.Drawing.Size(69, 17);
|
||||
this.SelectAll.TabIndex = 7;
|
||||
this.SelectAll.Text = "Select all";
|
||||
this.SelectAll.UseVisualStyleBackColor = true;
|
||||
this.SelectAll.Click += new System.EventHandler(this.SelectAll_Click);
|
||||
//
|
||||
// NESSoundConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(220, 193);
|
||||
this.Controls.Add(this.SelectAll);
|
||||
this.Controls.Add(this.DMC);
|
||||
this.Controls.Add(this.Noise);
|
||||
this.Controls.Add(this.Square2);
|
||||
this.Controls.Add(this.Triangle);
|
||||
this.Controls.Add(this.Square1);
|
||||
this.Controls.Add(this.Cancel);
|
||||
this.Controls.Add(this.OK);
|
||||
this.Name = "NESSoundConfig";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "NES Sound Channels";
|
||||
this.Load += new System.EventHandler(this.NESSoundConfig_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button OK;
|
||||
private System.Windows.Forms.Button Cancel;
|
||||
private System.Windows.Forms.CheckBox Square1;
|
||||
private System.Windows.Forms.CheckBox Triangle;
|
||||
private System.Windows.Forms.CheckBox Noise;
|
||||
private System.Windows.Forms.CheckBox Square2;
|
||||
private System.Windows.Forms.CheckBox DMC;
|
||||
private System.Windows.Forms.CheckBox SelectAll;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using BizHawk.Emulation.Consoles.Nintendo;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class NESSoundConfig : Form
|
||||
{
|
||||
public NESSoundConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void NESSoundConfig_Load(object sender, EventArgs e)
|
||||
{
|
||||
Square1.Checked = Global.Config.NESEnableSquare1;
|
||||
Square2.Checked = Global.Config.NESEnableSquare2;
|
||||
Triangle.Checked = Global.Config.NESEnableTriangle;
|
||||
Noise.Checked = Global.Config.NESEnableNoise;
|
||||
DMC.Checked = Global.Config.NESEnableDMC;
|
||||
}
|
||||
|
||||
private void OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.NESEnableSquare1 = Square1.Checked;
|
||||
Global.Config.NESEnableSquare2 = Square2.Checked;
|
||||
Global.Config.NESEnableTriangle = Triangle.Checked;
|
||||
Global.Config.NESEnableNoise = Noise.Checked;
|
||||
Global.Config.NESEnableDMC = DMC.Checked;
|
||||
Global.MainForm.SetNESSoundChannels();
|
||||
Close();
|
||||
}
|
||||
|
||||
private void Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void SelectAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (SelectAll.Checked)
|
||||
{
|
||||
Square1.Checked = true;
|
||||
Square2.Checked = true;
|
||||
Triangle.Checked = true;
|
||||
Noise.Checked = true;
|
||||
DMC.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Square1.Checked = false;
|
||||
Square2.Checked = false;
|
||||
Triangle.Checked = false;
|
||||
Noise.Checked = false;
|
||||
DMC.Checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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>
|
Loading…
Reference in New Issue