rework NES palette config in new core config system

This commit is contained in:
goyuken 2013-12-22 06:55:34 +00:00
parent a5cdee3780
commit 0cd5af1843
7 changed files with 434 additions and 423 deletions

View File

@ -336,11 +336,11 @@ namespace BizHawk.Client.Common
// NES Graphics settings // NES Graphics settings
//public bool NESAllowMoreThanEightSprites = false; //public bool NESAllowMoreThanEightSprites = false;
//public bool NESClipLeftAndRight = false; //public bool NESClipLeftAndRight = false;
public bool NESAutoLoadPalette = true; //public bool NESAutoLoadPalette = true;
//public bool NESDispBackground = true; //public bool NESDispBackground = true;
//public bool NESDispSprites = true; //public bool NESDispSprites = true;
//public int NESBackgroundColor = 0; //public int NESBackgroundColor = 0;
public string NESPaletteFile = ""; //public string NESPaletteFile = "";
//public int NTSC_NESTopLine = 8; //public int NTSC_NESTopLine = 8;
//public int NTSC_NESBottomLine = 231; //public int NTSC_NESBottomLine = 231;
//public int PAL_NESTopLine = 8; //public int PAL_NESTopLine = 8;

View File

@ -3433,14 +3433,7 @@ namespace BizHawk.Client.EmuHawk
case "NES": case "NES":
{ {
var nes = new NES(nextComm, game, rom.FileData, Global.MovieSession.Movie.Header.BoardProperties); var nes = new NES(nextComm, game, rom.FileData, Global.MovieSession.Movie.Header.BoardProperties);
nextEmulator = nes; nextEmulator = nes;
if (Global.Config.NESAutoLoadPalette && Global.Config.NESPaletteFile.Length > 0 &&
HawkFile.ExistsAt(Global.Config.NESPaletteFile))
{
nes.SetPalette(
NES.Palettes.Load_FCEUX_Palette(HawkFile.ReadAllBytes(Global.Config.NESPaletteFile)));
}
} }
break; break;
case "GB": case "GB":

View File

@ -28,438 +28,438 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.OK = new System.Windows.Forms.Button(); this.OK = new System.Windows.Forms.Button();
this.Cancel = new System.Windows.Forms.Button(); this.Cancel = new System.Windows.Forms.Button();
this.AllowMoreSprites = new System.Windows.Forms.CheckBox(); this.AllowMoreSprites = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.AutoLoadPalette = new System.Windows.Forms.CheckBox(); this.AutoLoadPalette = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.PalettePath = new System.Windows.Forms.TextBox(); this.PalettePath = new System.Windows.Forms.TextBox();
this.BrowsePalette = new System.Windows.Forms.Button(); this.BrowsePalette = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
this.PAL_LastLineNumeric = new System.Windows.Forms.NumericUpDown(); this.PAL_LastLineNumeric = new System.Windows.Forms.NumericUpDown();
this.PAL_FirstLineNumeric = new System.Windows.Forms.NumericUpDown(); this.PAL_FirstLineNumeric = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.btnAreaFull = new System.Windows.Forms.Button(); this.btnAreaFull = new System.Windows.Forms.Button();
this.btnAreaStandard = new System.Windows.Forms.Button(); this.btnAreaStandard = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.NTSC_LastLineNumeric = new System.Windows.Forms.NumericUpDown(); this.NTSC_LastLineNumeric = new System.Windows.Forms.NumericUpDown();
this.NTSC_FirstLineNumeric = new System.Windows.Forms.NumericUpDown(); this.NTSC_FirstLineNumeric = new System.Windows.Forms.NumericUpDown();
this.ClipLeftAndRightCheckBox = new System.Windows.Forms.CheckBox(); this.ClipLeftAndRightCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.checkUseBackdropColor = new System.Windows.Forms.CheckBox(); this.checkUseBackdropColor = new System.Windows.Forms.CheckBox();
this.ChangeBGColor = new System.Windows.Forms.Button(); this.ChangeBGColor = new System.Windows.Forms.Button();
this.BackGroundColorNumber = new System.Windows.Forms.TextBox(); this.BackGroundColorNumber = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox(); this.groupBox4 = new System.Windows.Forms.GroupBox();
this.BackgroundColorPanel = new System.Windows.Forms.Panel(); this.BackgroundColorPanel = new System.Windows.Forms.Panel();
this.DispBackground = new System.Windows.Forms.CheckBox(); this.DispBackground = new System.Windows.Forms.CheckBox();
this.DispSprites = new System.Windows.Forms.CheckBox(); this.DispSprites = new System.Windows.Forms.CheckBox();
this.BGColorDialog = new System.Windows.Forms.ColorDialog(); this.BGColorDialog = new System.Windows.Forms.ColorDialog();
this.RestoreDefaultsButton = new System.Windows.Forms.Button(); this.RestoreDefaultsButton = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PAL_LastLineNumeric)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PAL_LastLineNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PAL_FirstLineNumeric)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PAL_FirstLineNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NTSC_LastLineNumeric)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NTSC_LastLineNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NTSC_FirstLineNumeric)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NTSC_FirstLineNumeric)).BeginInit();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// OK // OK
// //
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.OK.Location = new System.Drawing.Point(213, 385); this.OK.Location = new System.Drawing.Point(213, 385);
this.OK.Name = "OK"; this.OK.Name = "OK";
this.OK.Size = new System.Drawing.Size(75, 23); this.OK.Size = new System.Drawing.Size(75, 23);
this.OK.TabIndex = 70; this.OK.TabIndex = 70;
this.OK.Text = "&Ok"; this.OK.Text = "&Ok";
this.OK.UseVisualStyleBackColor = true; this.OK.UseVisualStyleBackColor = true;
this.OK.Click += new System.EventHandler(this.OK_Click); this.OK.Click += new System.EventHandler(this.OK_Click);
// //
// Cancel // Cancel
// //
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Cancel.Location = new System.Drawing.Point(294, 385); this.Cancel.Location = new System.Drawing.Point(294, 385);
this.Cancel.Name = "Cancel"; this.Cancel.Name = "Cancel";
this.Cancel.Size = new System.Drawing.Size(75, 23); this.Cancel.Size = new System.Drawing.Size(75, 23);
this.Cancel.TabIndex = 75; this.Cancel.TabIndex = 75;
this.Cancel.Text = "&Cancel"; this.Cancel.Text = "&Cancel";
this.Cancel.UseVisualStyleBackColor = true; this.Cancel.UseVisualStyleBackColor = true;
// //
// AllowMoreSprites // AllowMoreSprites
// //
this.AllowMoreSprites.AutoSize = true; this.AllowMoreSprites.AutoSize = true;
this.AllowMoreSprites.Location = new System.Drawing.Point(134, 96); this.AllowMoreSprites.Location = new System.Drawing.Point(134, 96);
this.AllowMoreSprites.Name = "AllowMoreSprites"; this.AllowMoreSprites.Name = "AllowMoreSprites";
this.AllowMoreSprites.Size = new System.Drawing.Size(203, 17); this.AllowMoreSprites.Size = new System.Drawing.Size(203, 17);
this.AllowMoreSprites.TabIndex = 23; this.AllowMoreSprites.TabIndex = 23;
this.AllowMoreSprites.Text = "Allow more than 8 sprites per scanline"; this.AllowMoreSprites.Text = "Allow more than 8 sprites per scanline";
this.AllowMoreSprites.UseVisualStyleBackColor = true; this.AllowMoreSprites.UseVisualStyleBackColor = true;
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.AutoLoadPalette); this.groupBox1.Controls.Add(this.AutoLoadPalette);
this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.PalettePath); this.groupBox1.Controls.Add(this.PalettePath);
this.groupBox1.Controls.Add(this.BrowsePalette); this.groupBox1.Controls.Add(this.BrowsePalette);
this.groupBox1.Location = new System.Drawing.Point(12, 12); this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(352, 95); this.groupBox1.Size = new System.Drawing.Size(352, 95);
this.groupBox1.TabIndex = 3; this.groupBox1.TabIndex = 3;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "Palette Config"; this.groupBox1.Text = "Palette Config";
// //
// AutoLoadPalette // AutoLoadPalette
// //
this.AutoLoadPalette.AutoSize = true; this.AutoLoadPalette.AutoSize = true;
this.AutoLoadPalette.Checked = true; this.AutoLoadPalette.Checked = true;
this.AutoLoadPalette.CheckState = System.Windows.Forms.CheckState.Checked; this.AutoLoadPalette.CheckState = System.Windows.Forms.CheckState.Checked;
this.AutoLoadPalette.Location = new System.Drawing.Point(6, 66); this.AutoLoadPalette.Location = new System.Drawing.Point(6, 66);
this.AutoLoadPalette.Name = "AutoLoadPalette"; this.AutoLoadPalette.Name = "AutoLoadPalette";
this.AutoLoadPalette.Size = new System.Drawing.Size(135, 17); this.AutoLoadPalette.Size = new System.Drawing.Size(129, 17);
this.AutoLoadPalette.TabIndex = 10; this.AutoLoadPalette.TabIndex = 10;
this.AutoLoadPalette.Text = "Load this file on startup"; this.AutoLoadPalette.Text = "Change to this palette";
this.AutoLoadPalette.UseVisualStyleBackColor = true; this.AutoLoadPalette.UseVisualStyleBackColor = true;
// //
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(6, 24); this.label1.Location = new System.Drawing.Point(6, 24);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(100, 13); this.label1.Size = new System.Drawing.Size(100, 13);
this.label1.TabIndex = 2; this.label1.TabIndex = 2;
this.label1.Text = "Use palette from file"; this.label1.Text = "Use palette from file";
// //
// PalettePath // PalettePath
// //
this.PalettePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.PalettePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.PalettePath.Location = new System.Drawing.Point(6, 40); this.PalettePath.Location = new System.Drawing.Point(6, 40);
this.PalettePath.Name = "PalettePath"; this.PalettePath.Name = "PalettePath";
this.PalettePath.Size = new System.Drawing.Size(259, 20); this.PalettePath.Size = new System.Drawing.Size(259, 20);
this.PalettePath.TabIndex = 1; this.PalettePath.TabIndex = 1;
// //
// BrowsePalette // BrowsePalette
// //
this.BrowsePalette.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.BrowsePalette.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BrowsePalette.Location = new System.Drawing.Point(271, 37); this.BrowsePalette.Location = new System.Drawing.Point(271, 37);
this.BrowsePalette.Name = "BrowsePalette"; this.BrowsePalette.Name = "BrowsePalette";
this.BrowsePalette.Size = new System.Drawing.Size(75, 23); this.BrowsePalette.Size = new System.Drawing.Size(75, 23);
this.BrowsePalette.TabIndex = 5; this.BrowsePalette.TabIndex = 5;
this.BrowsePalette.Text = "&Browse..."; this.BrowsePalette.Text = "&Browse...";
this.BrowsePalette.UseVisualStyleBackColor = true; this.BrowsePalette.UseVisualStyleBackColor = true;
this.BrowsePalette.Click += new System.EventHandler(this.BrowsePalette_Click); this.BrowsePalette.Click += new System.EventHandler(this.BrowsePalette_Click);
// //
// groupBox2 // groupBox2
// //
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.PAL_LastLineNumeric); this.groupBox2.Controls.Add(this.PAL_LastLineNumeric);
this.groupBox2.Controls.Add(this.PAL_FirstLineNumeric); this.groupBox2.Controls.Add(this.PAL_FirstLineNumeric);
this.groupBox2.Controls.Add(this.label5); this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.btnAreaFull); this.groupBox2.Controls.Add(this.btnAreaFull);
this.groupBox2.Controls.Add(this.btnAreaStandard); this.groupBox2.Controls.Add(this.btnAreaStandard);
this.groupBox2.Controls.Add(this.label4); this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.label3); this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.NTSC_LastLineNumeric); this.groupBox2.Controls.Add(this.NTSC_LastLineNumeric);
this.groupBox2.Controls.Add(this.NTSC_FirstLineNumeric); this.groupBox2.Controls.Add(this.NTSC_FirstLineNumeric);
this.groupBox2.Controls.Add(this.ClipLeftAndRightCheckBox); this.groupBox2.Controls.Add(this.ClipLeftAndRightCheckBox);
this.groupBox2.Controls.Add(this.AllowMoreSprites); this.groupBox2.Controls.Add(this.AllowMoreSprites);
this.groupBox2.Location = new System.Drawing.Point(12, 113); this.groupBox2.Location = new System.Drawing.Point(12, 113);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(352, 150); this.groupBox2.Size = new System.Drawing.Size(352, 150);
this.groupBox2.TabIndex = 4; this.groupBox2.TabIndex = 4;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "Drawing Area"; this.groupBox2.Text = "Drawing Area";
// //
// label6 // label6
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(131, 22); this.label6.Location = new System.Drawing.Point(131, 22);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(27, 13); this.label6.Size = new System.Drawing.Size(27, 13);
this.label6.TabIndex = 44; this.label6.TabIndex = 44;
this.label6.Text = "PAL"; this.label6.Text = "PAL";
// //
// PAL_LastLineNumeric // PAL_LastLineNumeric
// //
this.PAL_LastLineNumeric.Location = new System.Drawing.Point(124, 67); this.PAL_LastLineNumeric.Location = new System.Drawing.Point(124, 67);
this.PAL_LastLineNumeric.Maximum = new decimal(new int[] { this.PAL_LastLineNumeric.Maximum = new decimal(new int[] {
239, 239,
0, 0,
0, 0,
0}); 0});
this.PAL_LastLineNumeric.Minimum = new decimal(new int[] { this.PAL_LastLineNumeric.Minimum = new decimal(new int[] {
128, 128,
0, 0,
0, 0,
0}); 0});
this.PAL_LastLineNumeric.Name = "PAL_LastLineNumeric"; this.PAL_LastLineNumeric.Name = "PAL_LastLineNumeric";
this.PAL_LastLineNumeric.Size = new System.Drawing.Size(47, 20); this.PAL_LastLineNumeric.Size = new System.Drawing.Size(47, 20);
this.PAL_LastLineNumeric.TabIndex = 43; this.PAL_LastLineNumeric.TabIndex = 43;
this.PAL_LastLineNumeric.Value = new decimal(new int[] { this.PAL_LastLineNumeric.Value = new decimal(new int[] {
128, 128,
0, 0,
0, 0,
0}); 0});
// //
// PAL_FirstLineNumeric // PAL_FirstLineNumeric
// //
this.PAL_FirstLineNumeric.Location = new System.Drawing.Point(124, 41); this.PAL_FirstLineNumeric.Location = new System.Drawing.Point(124, 41);
this.PAL_FirstLineNumeric.Maximum = new decimal(new int[] { this.PAL_FirstLineNumeric.Maximum = new decimal(new int[] {
127, 127,
0, 0,
0, 0,
0}); 0});
this.PAL_FirstLineNumeric.Name = "PAL_FirstLineNumeric"; this.PAL_FirstLineNumeric.Name = "PAL_FirstLineNumeric";
this.PAL_FirstLineNumeric.Size = new System.Drawing.Size(47, 20); this.PAL_FirstLineNumeric.Size = new System.Drawing.Size(47, 20);
this.PAL_FirstLineNumeric.TabIndex = 42; this.PAL_FirstLineNumeric.TabIndex = 42;
// //
// label5 // label5
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(62, 22); this.label5.Location = new System.Drawing.Point(62, 22);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(36, 13); this.label5.Size = new System.Drawing.Size(36, 13);
this.label5.TabIndex = 41; this.label5.TabIndex = 41;
this.label5.Text = "NTSC"; this.label5.Text = "NTSC";
// //
// btnAreaFull // btnAreaFull
// //
this.btnAreaFull.Location = new System.Drawing.Point(7, 115); this.btnAreaFull.Location = new System.Drawing.Point(7, 115);
this.btnAreaFull.Name = "btnAreaFull"; this.btnAreaFull.Name = "btnAreaFull";
this.btnAreaFull.Size = new System.Drawing.Size(94, 23); this.btnAreaFull.Size = new System.Drawing.Size(94, 23);
this.btnAreaFull.TabIndex = 40; this.btnAreaFull.TabIndex = 40;
this.btnAreaFull.Text = "Full [0,239]"; this.btnAreaFull.Text = "Full [0,239]";
this.btnAreaFull.UseVisualStyleBackColor = true; this.btnAreaFull.UseVisualStyleBackColor = true;
this.btnAreaFull.Click += new System.EventHandler(this.btnAreaFull_Click); this.btnAreaFull.Click += new System.EventHandler(this.btnAreaFull_Click);
// //
// btnAreaStandard // btnAreaStandard
// //
this.btnAreaStandard.Location = new System.Drawing.Point(8, 92); this.btnAreaStandard.Location = new System.Drawing.Point(8, 92);
this.btnAreaStandard.Name = "btnAreaStandard"; this.btnAreaStandard.Name = "btnAreaStandard";
this.btnAreaStandard.Size = new System.Drawing.Size(94, 23); this.btnAreaStandard.Size = new System.Drawing.Size(94, 23);
this.btnAreaStandard.TabIndex = 35; this.btnAreaStandard.TabIndex = 35;
this.btnAreaStandard.Text = "Standard [8,231]"; this.btnAreaStandard.Text = "Standard [8,231]";
this.btnAreaStandard.UseVisualStyleBackColor = true; this.btnAreaStandard.UseVisualStyleBackColor = true;
this.btnAreaStandard.Click += new System.EventHandler(this.btnAreaStandard_Click); this.btnAreaStandard.Click += new System.EventHandler(this.btnAreaStandard_Click);
// //
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(4, 69); this.label4.Location = new System.Drawing.Point(4, 69);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(49, 13); this.label4.Size = new System.Drawing.Size(49, 13);
this.label4.TabIndex = 24; this.label4.TabIndex = 24;
this.label4.Text = "Last line:"; this.label4.Text = "Last line:";
// //
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(5, 43); this.label3.Location = new System.Drawing.Point(5, 43);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(48, 13); this.label3.Size = new System.Drawing.Size(48, 13);
this.label3.TabIndex = 23; this.label3.TabIndex = 23;
this.label3.Text = "First line:"; this.label3.Text = "First line:";
// //
// NTSC_LastLineNumeric // NTSC_LastLineNumeric
// //
this.NTSC_LastLineNumeric.Location = new System.Drawing.Point(59, 67); this.NTSC_LastLineNumeric.Location = new System.Drawing.Point(59, 67);
this.NTSC_LastLineNumeric.Maximum = new decimal(new int[] { this.NTSC_LastLineNumeric.Maximum = new decimal(new int[] {
239, 239,
0, 0,
0, 0,
0}); 0});
this.NTSC_LastLineNumeric.Minimum = new decimal(new int[] { this.NTSC_LastLineNumeric.Minimum = new decimal(new int[] {
128, 128,
0, 0,
0, 0,
0}); 0});
this.NTSC_LastLineNumeric.Name = "NTSC_LastLineNumeric"; this.NTSC_LastLineNumeric.Name = "NTSC_LastLineNumeric";
this.NTSC_LastLineNumeric.Size = new System.Drawing.Size(47, 20); this.NTSC_LastLineNumeric.Size = new System.Drawing.Size(47, 20);
this.NTSC_LastLineNumeric.TabIndex = 28; this.NTSC_LastLineNumeric.TabIndex = 28;
this.NTSC_LastLineNumeric.Value = new decimal(new int[] { this.NTSC_LastLineNumeric.Value = new decimal(new int[] {
128, 128,
0, 0,
0, 0,
0}); 0});
// //
// NTSC_FirstLineNumeric // NTSC_FirstLineNumeric
// //
this.NTSC_FirstLineNumeric.Location = new System.Drawing.Point(59, 41); this.NTSC_FirstLineNumeric.Location = new System.Drawing.Point(59, 41);
this.NTSC_FirstLineNumeric.Maximum = new decimal(new int[] { this.NTSC_FirstLineNumeric.Maximum = new decimal(new int[] {
127, 127,
0, 0,
0, 0,
0}); 0});
this.NTSC_FirstLineNumeric.Name = "NTSC_FirstLineNumeric"; this.NTSC_FirstLineNumeric.Name = "NTSC_FirstLineNumeric";
this.NTSC_FirstLineNumeric.Size = new System.Drawing.Size(47, 20); this.NTSC_FirstLineNumeric.Size = new System.Drawing.Size(47, 20);
this.NTSC_FirstLineNumeric.TabIndex = 21; this.NTSC_FirstLineNumeric.TabIndex = 21;
// //
// ClipLeftAndRightCheckBox // ClipLeftAndRightCheckBox
// //
this.ClipLeftAndRightCheckBox.AutoSize = true; this.ClipLeftAndRightCheckBox.AutoSize = true;
this.ClipLeftAndRightCheckBox.Location = new System.Drawing.Point(134, 119); this.ClipLeftAndRightCheckBox.Location = new System.Drawing.Point(134, 119);
this.ClipLeftAndRightCheckBox.Name = "ClipLeftAndRightCheckBox"; this.ClipLeftAndRightCheckBox.Name = "ClipLeftAndRightCheckBox";
this.ClipLeftAndRightCheckBox.Size = new System.Drawing.Size(186, 17); this.ClipLeftAndRightCheckBox.Size = new System.Drawing.Size(186, 17);
this.ClipLeftAndRightCheckBox.TabIndex = 30; this.ClipLeftAndRightCheckBox.TabIndex = 30;
this.ClipLeftAndRightCheckBox.Text = "Clip Left and Right Sides (8 pixels)"; this.ClipLeftAndRightCheckBox.Text = "Clip Left and Right Sides (8 pixels)";
this.ClipLeftAndRightCheckBox.UseVisualStyleBackColor = true; this.ClipLeftAndRightCheckBox.UseVisualStyleBackColor = true;
// //
// groupBox3 // groupBox3
// //
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox3.Controls.Add(this.checkUseBackdropColor); this.groupBox3.Controls.Add(this.checkUseBackdropColor);
this.groupBox3.Controls.Add(this.ChangeBGColor); this.groupBox3.Controls.Add(this.ChangeBGColor);
this.groupBox3.Controls.Add(this.BackGroundColorNumber); this.groupBox3.Controls.Add(this.BackGroundColorNumber);
this.groupBox3.Controls.Add(this.label2); this.groupBox3.Controls.Add(this.label2);
this.groupBox3.Controls.Add(this.groupBox4); this.groupBox3.Controls.Add(this.groupBox4);
this.groupBox3.Controls.Add(this.DispBackground); this.groupBox3.Controls.Add(this.DispBackground);
this.groupBox3.Controls.Add(this.DispSprites); this.groupBox3.Controls.Add(this.DispSprites);
this.groupBox3.Location = new System.Drawing.Point(12, 266); this.groupBox3.Location = new System.Drawing.Point(12, 266);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(352, 113); this.groupBox3.Size = new System.Drawing.Size(352, 113);
this.groupBox3.TabIndex = 5; this.groupBox3.TabIndex = 5;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "BG and Sprites"; this.groupBox3.Text = "BG and Sprites";
// //
// checkUseBackdropColor // checkUseBackdropColor
// //
this.checkUseBackdropColor.AutoSize = true; this.checkUseBackdropColor.AutoSize = true;
this.checkUseBackdropColor.Checked = true; this.checkUseBackdropColor.Checked = true;
this.checkUseBackdropColor.CheckState = System.Windows.Forms.CheckState.Checked; this.checkUseBackdropColor.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkUseBackdropColor.Location = new System.Drawing.Point(169, 87); this.checkUseBackdropColor.Location = new System.Drawing.Point(169, 87);
this.checkUseBackdropColor.Name = "checkUseBackdropColor"; this.checkUseBackdropColor.Name = "checkUseBackdropColor";
this.checkUseBackdropColor.Size = new System.Drawing.Size(59, 17); this.checkUseBackdropColor.Size = new System.Drawing.Size(59, 17);
this.checkUseBackdropColor.TabIndex = 60; this.checkUseBackdropColor.TabIndex = 60;
this.checkUseBackdropColor.Text = "Enable"; this.checkUseBackdropColor.Text = "Enable";
this.checkUseBackdropColor.UseVisualStyleBackColor = true; this.checkUseBackdropColor.UseVisualStyleBackColor = true;
// //
// ChangeBGColor // ChangeBGColor
// //
this.ChangeBGColor.Location = new System.Drawing.Point(111, 83); this.ChangeBGColor.Location = new System.Drawing.Point(111, 83);
this.ChangeBGColor.Name = "ChangeBGColor"; this.ChangeBGColor.Name = "ChangeBGColor";
this.ChangeBGColor.Size = new System.Drawing.Size(52, 23); this.ChangeBGColor.Size = new System.Drawing.Size(52, 23);
this.ChangeBGColor.TabIndex = 55; this.ChangeBGColor.TabIndex = 55;
this.ChangeBGColor.Text = "Change"; this.ChangeBGColor.Text = "Change";
this.ChangeBGColor.UseVisualStyleBackColor = true; this.ChangeBGColor.UseVisualStyleBackColor = true;
this.ChangeBGColor.Click += new System.EventHandler(this.ChangeBGColor_Click); this.ChangeBGColor.Click += new System.EventHandler(this.ChangeBGColor_Click);
// //
// BackGroundColorNumber // BackGroundColorNumber
// //
this.BackGroundColorNumber.Location = new System.Drawing.Point(46, 85); this.BackGroundColorNumber.Location = new System.Drawing.Point(46, 85);
this.BackGroundColorNumber.MaxLength = 8; this.BackGroundColorNumber.MaxLength = 8;
this.BackGroundColorNumber.Name = "BackGroundColorNumber"; this.BackGroundColorNumber.Name = "BackGroundColorNumber";
this.BackGroundColorNumber.ReadOnly = true; this.BackGroundColorNumber.ReadOnly = true;
this.BackGroundColorNumber.Size = new System.Drawing.Size(59, 20); this.BackGroundColorNumber.Size = new System.Drawing.Size(59, 20);
this.BackGroundColorNumber.TabIndex = 53; this.BackGroundColorNumber.TabIndex = 53;
// //
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(8, 64); this.label2.Location = new System.Drawing.Point(8, 64);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(178, 13); this.label2.Size = new System.Drawing.Size(178, 13);
this.label2.TabIndex = 3; this.label2.TabIndex = 3;
this.label2.Text = "Backdrop color when BG is disabled"; this.label2.Text = "Backdrop color when BG is disabled";
// //
// groupBox4 // groupBox4
// //
this.groupBox4.Controls.Add(this.BackgroundColorPanel); this.groupBox4.Controls.Add(this.BackgroundColorPanel);
this.groupBox4.Location = new System.Drawing.Point(8, 79); this.groupBox4.Location = new System.Drawing.Point(8, 79);
this.groupBox4.Name = "groupBox4"; this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(28, 28); this.groupBox4.Size = new System.Drawing.Size(28, 28);
this.groupBox4.TabIndex = 2; this.groupBox4.TabIndex = 2;
this.groupBox4.TabStop = false; this.groupBox4.TabStop = false;
// //
// BackgroundColorPanel // BackgroundColorPanel
// //
this.BackgroundColorPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.BackgroundColorPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.BackgroundColorPanel.Location = new System.Drawing.Point(4, 8); this.BackgroundColorPanel.Location = new System.Drawing.Point(4, 8);
this.BackgroundColorPanel.Name = "BackgroundColorPanel"; this.BackgroundColorPanel.Name = "BackgroundColorPanel";
this.BackgroundColorPanel.Size = new System.Drawing.Size(20, 16); this.BackgroundColorPanel.Size = new System.Drawing.Size(20, 16);
this.BackgroundColorPanel.TabIndex = 0; this.BackgroundColorPanel.TabIndex = 0;
this.BackgroundColorPanel.DoubleClick += new System.EventHandler(this.BackgroundColorPanel_DoubleClick); this.BackgroundColorPanel.DoubleClick += new System.EventHandler(this.BackgroundColorPanel_DoubleClick);
// //
// DispBackground // DispBackground
// //
this.DispBackground.AutoSize = true; this.DispBackground.AutoSize = true;
this.DispBackground.Checked = true; this.DispBackground.Checked = true;
this.DispBackground.CheckState = System.Windows.Forms.CheckState.Checked; this.DispBackground.CheckState = System.Windows.Forms.CheckState.Checked;
this.DispBackground.Location = new System.Drawing.Point(7, 42); this.DispBackground.Location = new System.Drawing.Point(7, 42);
this.DispBackground.Name = "DispBackground"; this.DispBackground.Name = "DispBackground";
this.DispBackground.Size = new System.Drawing.Size(78, 17); this.DispBackground.Size = new System.Drawing.Size(78, 17);
this.DispBackground.TabIndex = 50; this.DispBackground.TabIndex = 50;
this.DispBackground.Text = "Display BG"; this.DispBackground.Text = "Display BG";
this.DispBackground.UseVisualStyleBackColor = true; this.DispBackground.UseVisualStyleBackColor = true;
// //
// DispSprites // DispSprites
// //
this.DispSprites.AutoSize = true; this.DispSprites.AutoSize = true;
this.DispSprites.Checked = true; this.DispSprites.Checked = true;
this.DispSprites.CheckState = System.Windows.Forms.CheckState.Checked; this.DispSprites.CheckState = System.Windows.Forms.CheckState.Checked;
this.DispSprites.Location = new System.Drawing.Point(7, 19); this.DispSprites.Location = new System.Drawing.Point(7, 19);
this.DispSprites.Name = "DispSprites"; this.DispSprites.Name = "DispSprites";
this.DispSprites.Size = new System.Drawing.Size(95, 17); this.DispSprites.Size = new System.Drawing.Size(95, 17);
this.DispSprites.TabIndex = 45; this.DispSprites.TabIndex = 45;
this.DispSprites.Text = "Display Sprites"; this.DispSprites.Text = "Display Sprites";
this.DispSprites.UseVisualStyleBackColor = true; this.DispSprites.UseVisualStyleBackColor = true;
// //
// RestoreDefaultsButton // RestoreDefaultsButton
// //
this.RestoreDefaultsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.RestoreDefaultsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.RestoreDefaultsButton.Location = new System.Drawing.Point(12, 385); this.RestoreDefaultsButton.Location = new System.Drawing.Point(12, 385);
this.RestoreDefaultsButton.Name = "RestoreDefaultsButton"; this.RestoreDefaultsButton.Name = "RestoreDefaultsButton";
this.RestoreDefaultsButton.Size = new System.Drawing.Size(102, 23); this.RestoreDefaultsButton.Size = new System.Drawing.Size(102, 23);
this.RestoreDefaultsButton.TabIndex = 65; this.RestoreDefaultsButton.TabIndex = 65;
this.RestoreDefaultsButton.Text = "&Restore Defaults"; this.RestoreDefaultsButton.Text = "&Restore Defaults";
this.RestoreDefaultsButton.UseVisualStyleBackColor = true; this.RestoreDefaultsButton.UseVisualStyleBackColor = true;
this.RestoreDefaultsButton.Click += new System.EventHandler(this.RestoreDefaultsButton_Click); this.RestoreDefaultsButton.Click += new System.EventHandler(this.RestoreDefaultsButton_Click);
// //
// NESGraphicsConfig // NESGraphicsConfig
// //
this.AcceptButton = this.OK; this.AcceptButton = this.OK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.Cancel; this.CancelButton = this.Cancel;
this.ClientSize = new System.Drawing.Size(373, 409); this.ClientSize = new System.Drawing.Size(381, 409);
this.Controls.Add(this.RestoreDefaultsButton); this.Controls.Add(this.RestoreDefaultsButton);
this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Controls.Add(this.Cancel); this.Controls.Add(this.Cancel);
this.Controls.Add(this.OK); this.Controls.Add(this.OK);
this.MaximizeBox = false; this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(389, 494); this.MaximumSize = new System.Drawing.Size(389, 494);
this.MinimizeBox = false; this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(389, 434); this.MinimumSize = new System.Drawing.Size(389, 434);
this.Name = "NESGraphicsConfig"; this.Name = "NESGraphicsConfig";
this.ShowIcon = false; this.ShowIcon = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "NES Graphics Settings"; this.Text = "NES Graphics Settings";
this.Load += new System.EventHandler(this.NESGraphicsConfig_Load); this.Load += new System.EventHandler(this.NESGraphicsConfig_Load);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout(); this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.PAL_LastLineNumeric)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.PAL_LastLineNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PAL_FirstLineNumeric)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.PAL_FirstLineNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NTSC_LastLineNumeric)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NTSC_LastLineNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NTSC_FirstLineNumeric)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NTSC_FirstLineNumeric)).EndInit();
this.groupBox3.ResumeLayout(false); this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout(); this.groupBox3.PerformLayout();
this.groupBox4.ResumeLayout(false); this.groupBox4.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }

View File

@ -39,8 +39,6 @@ namespace BizHawk.Client.EmuHawk
PAL_LastLineNumeric.Value = settings.PAL_BottomLine; PAL_LastLineNumeric.Value = settings.PAL_BottomLine;
AllowMoreSprites.Checked = settings.AllowMoreThanEightSprites; AllowMoreSprites.Checked = settings.AllowMoreThanEightSprites;
ClipLeftAndRightCheckBox.Checked = settings.ClipLeftAndRight; ClipLeftAndRightCheckBox.Checked = settings.ClipLeftAndRight;
AutoLoadPalette.Checked = settings.AutoLoadPalette;
PalettePath.Text = Global.Config.NESPaletteFile;
DispSprites.Checked = settings.DispSprites; DispSprites.Checked = settings.DispSprites;
DispBackground.Checked = settings.DispBackground; DispBackground.Checked = settings.DispBackground;
BGColorDialog.Color = Color.FromArgb(unchecked(settings.BackgroundColor | (int)0xFF000000)); BGColorDialog.Color = Color.FromArgb(unchecked(settings.BackgroundColor | (int)0xFF000000));
@ -68,25 +66,24 @@ namespace BizHawk.Client.EmuHawk
private void OK_Click(object sender, EventArgs e) private void OK_Click(object sender, EventArgs e)
{ {
if (PalettePath.Text.Length > 0) if (AutoLoadPalette.Checked)
{ {
palette = new HawkFile(PalettePath.Text); if (PalettePath.Text.Length > 0)
if (palette != null && palette.Exists)
{ {
if (Global.Config.NESPaletteFile != palette.Name) palette = new HawkFile(PalettePath.Text);
if (palette != null && palette.Exists)
{ {
Global.Config.NESPaletteFile = palette.Name; var data = NES.Palettes.Load_FCEUX_Palette(HawkFile.ReadAllBytes(palette.Name));
nes.SetPalette(NES.Palettes.Load_FCEUX_Palette(HawkFile.ReadAllBytes(palette.Name))); settings.Palette = data;
GlobalWin.OSD.AddMessage("Palette file loaded: " + palette.Name); GlobalWin.OSD.AddMessage("Palette file loaded: " + palette.Name);
} }
} }
} else
else {
{ settings.Palette = (int[,])NES.Palettes.FCEUX_Standard.Clone();
Global.Config.NESPaletteFile = ""; GlobalWin.OSD.AddMessage("Standard Palette set");
nes.SetPalette(NES.Palettes.FCEUX_Standard); }
GlobalWin.OSD.AddMessage("Standard Palette set");
} }
settings.NTSC_TopLine = (int)NTSC_FirstLineNumeric.Value; settings.NTSC_TopLine = (int)NTSC_FirstLineNumeric.Value;
@ -95,7 +92,6 @@ namespace BizHawk.Client.EmuHawk
settings.PAL_BottomLine = (int)PAL_LastLineNumeric.Value; settings.PAL_BottomLine = (int)PAL_LastLineNumeric.Value;
settings.AllowMoreThanEightSprites = AllowMoreSprites.Checked; settings.AllowMoreThanEightSprites = AllowMoreSprites.Checked;
settings.ClipLeftAndRight = ClipLeftAndRightCheckBox.Checked; settings.ClipLeftAndRight = ClipLeftAndRightCheckBox.Checked;
settings.AutoLoadPalette = AutoLoadPalette.Checked;
settings.DispSprites = DispSprites.Checked; settings.DispSprites = DispSprites.Checked;
settings.DispBackground = DispBackground.Checked; settings.DispBackground = DispBackground.Checked;
settings.BackgroundColor = BGColorDialog.Color.ToArgb(); settings.BackgroundColor = BGColorDialog.Color.ToArgb();

View File

@ -63,6 +63,10 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\BizHawk.MultiClient\output\dll\EMU7800.dll</HintPath> <HintPath>..\BizHawk.MultiClient\output\dll\EMU7800.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core"> <Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework> <RequiredTargetFramework>3.5</RequiredTargetFramework>

View File

@ -432,7 +432,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
/// <summary> /// <summary>
/// sets the provided palette as current /// sets the provided palette as current
/// </summary> /// </summary>
public void SetPalette(int[,] pal) private void SetPalette(int[,] pal)
{ {
Array.Copy(pal,palette,64*3); Array.Copy(pal,palette,64*3);
for(int i=0;i<64*8;i++) for(int i=0;i<64*8;i++)

View File

@ -890,6 +890,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
} }
CoreComm.ScreenLogicalOffsetX = videoProvider.left; CoreComm.ScreenLogicalOffsetX = videoProvider.left;
CoreComm.ScreenLogicalOffsetY = DisplayType == DisplayType.NTSC ? Settings.NTSC_TopLine : Settings.PAL_TopLine; CoreComm.ScreenLogicalOffsetY = DisplayType == DisplayType.NTSC ? Settings.NTSC_TopLine : Settings.PAL_TopLine;
SetPalette(Settings.Palette);
return false; return false;
} }
@ -897,7 +899,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{ {
public bool AllowMoreThanEightSprites = false; public bool AllowMoreThanEightSprites = false;
public bool ClipLeftAndRight = false; public bool ClipLeftAndRight = false;
public bool AutoLoadPalette = true;
public bool DispBackground = true; public bool DispBackground = true;
public bool DispSprites = true; public bool DispSprites = true;
public int BackgroundColor = 0; public int BackgroundColor = 0;
@ -907,10 +908,27 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public int PAL_TopLine = 0; public int PAL_TopLine = 0;
public int PAL_BottomLine = 239; public int PAL_BottomLine = 239;
public int[,] Palette;
public NESSettings Clone() public NESSettings Clone()
{ {
return (NESSettings)MemberwiseClone(); return (NESSettings)MemberwiseClone();
} }
public NESSettings()
{
Palette = (int[,])Palettes.FCEUX_Standard.Clone();
}
[Newtonsoft.Json.JsonConstructor]
public NESSettings(int[,] Palette)
{
if (Palette == null)
// only needed for SVN purposes
this.Palette = (int[,])Palettes.FCEUX_Standard.Clone();
else
this.Palette = Palette;
}
} }
} }
} }