NES - separate first/last scanline settings for NTSC vs PAL (default of 8,231 NTSC and 0,239 for PAL)

This commit is contained in:
adelikat 2013-03-25 01:59:34 +00:00
parent 496f645b48
commit 1c33b92bf1
8 changed files with 241 additions and 73 deletions

View File

@ -46,7 +46,9 @@ namespace BizHawk.Emulation.Consoles.Nintendo
int[,] palette = new int[64,3];
int[] palette_compiled = new int[64*8];
IPortDevice[] ports;
private DisplayType _display_type = DisplayType.NTSC;
//Sound config
public void SetSquare1(bool enabled) { apu.EnableSquare1 = enabled; }
public void SetSquare2(bool enabled) { apu.EnableSquare2 = enabled; }
@ -184,6 +186,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
CoreComm.VsyncDen = 1;
cpuclockrate = 1662607;
cpu_sequence = cpu_sequence_PAL;
_display_type = DisplayType.PAL;
break;
case "NES-NTSC":
case "Famicom":
@ -209,6 +212,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
CoreComm.VsyncDen = 1;
cpuclockrate = 1773448;
cpu_sequence = cpu_sequence_NTSC;
_display_type = DisplayType.DENDY;
break;
case null:
Console.WriteLine("Unknown NES system! Defaulting to NTSC.");

View File

@ -150,12 +150,14 @@ namespace BizHawk.Emulation.Consoles.Nintendo
public CoreComm CoreComm { get; private set; }
public DisplayType DisplayType { get { return BizHawk.DisplayType.NTSC; } }
public DisplayType DisplayType { get { return _display_type; } }
class MyVideoProvider : IVideoProvider
{
public int top = 8;
public int bottom = 231;
public int ntsc_top = 8;
public int ntsc_bottom = 231;
public int pal_top = 0;
public int pal_bottom = 239;
public int left = 0;
public int right = 255;
@ -173,6 +175,19 @@ namespace BizHawk.Emulation.Consoles.Nintendo
public void FillFrameBuffer()
{
int the_top;
int the_bottom;
if (emu.DisplayType == DisplayType.NTSC)
{
the_top = ntsc_top;
the_bottom = ntsc_bottom;
}
else
{
the_top = pal_top;
the_bottom = pal_bottom;
}
int backdrop = 0;
if (emu.CoreComm != null)
backdrop = emu.CoreComm.NES_BackdropColor;
@ -182,25 +197,60 @@ namespace BizHawk.Emulation.Consoles.Nintendo
int width = BufferWidth;
for (int x = left; x <= right; x++)
{
for (int y = top; y <= bottom; y++)
for (int y = the_top; y <= the_bottom; y++)
{
short pixel = emu.ppu.xbuf[(y << 8) + x];
if ((pixel & 0x8000) != 0 && useBackdrop)
{
pixels[((y - top) * width) + (x - left)] = backdrop;
pixels[((y - the_top) * width) + (x - left)] = backdrop;
}
else pixels[((y - top) * width) + (x - left)] = emu.palette_compiled[pixel & 0x7FFF];
else pixels[((y - the_top) * width) + (x - left)] = emu.palette_compiled[pixel & 0x7FFF];
}
}
}
public int VirtualWidth { get { return BufferWidth; } }
public int BufferWidth { get { return right - left + 1; } }
public int BufferHeight { get { return bottom - top + 1; } }
public int BackgroundColor { get { return 0; } }
public int BufferHeight
{
get
{
if (emu.DisplayType == DisplayType.NTSC)
{
return ntsc_bottom - ntsc_top + 1;
}
else
{
return pal_bottom - pal_top + 1;
}
}
}
}
public int FirstDrawLine { get { return videoProvider.top; } set { videoProvider.top = value; CoreComm.ScreenLogicalOffsetY = videoProvider.top; } }
public int LastDrawLine { get { return videoProvider.bottom; } set { videoProvider.bottom = value; } }
public int NTSC_FirstDrawLine
{
get { return videoProvider.ntsc_top; }
set { videoProvider.ntsc_top = value; CoreComm.ScreenLogicalOffsetY = videoProvider.ntsc_top; }
}
public int NTSC_LastDrawLine
{
get { return videoProvider.ntsc_bottom; }
set { videoProvider.ntsc_bottom = value; }
}
public int PAL_FirstDrawLine
{
get { return videoProvider.pal_top; }
set { videoProvider.pal_top = value; CoreComm.ScreenLogicalOffsetY = videoProvider.pal_top; }
}
public int PAL_LastDrawLine
{
get { return videoProvider.pal_bottom; }
set { videoProvider.pal_bottom = value; }
}
public void SetClipLeftAndRight(bool clip)
{

View File

@ -112,5 +112,5 @@ namespace BizHawk
public enum Endian { Big, Little, Unknown }
public enum DisplayType { NTSC, PAL }
public enum DisplayType { NTSC, PAL, DENDY }
}

View File

@ -461,8 +461,10 @@ namespace BizHawk.MultiClient
public bool NESDispSprites = true;
public int NESBackgroundColor = 0;
public string NESPaletteFile = "";
public int NESTopLine = 8;
public int NESBottomLine = 231;
public int NTSC_NESTopLine = 8;
public int NTSC_NESBottomLine = 231;
public int PAL_NESTopLine = 8;
public int PAL_NESBottomLine = 231;
// gb gpu view settings
public bool AutoLoadGBGPUView = false;

View File

@ -2737,7 +2737,7 @@ namespace BizHawk.MultiClient
//NES library
//----------------------------------------------------
public void nes_setscanlines(object top, object bottom)
public void nes_setscanlines(object top, object bottom, bool pal = false)
{
int first = LuaInt(top);
@ -2760,24 +2760,54 @@ namespace BizHawk.MultiClient
last = 128;
}
Global.Config.NESTopLine = first;
Global.Config.NESBottomLine = last;
if (pal)
{
Global.Config.PAL_NESTopLine = first;
Global.Config.PAL_NESBottomLine = last;
}
else
{
Global.Config.NTSC_NESTopLine = first;
Global.Config.NTSC_NESBottomLine = last;
}
if (Global.Emulator is NES)
{
(Global.Emulator as NES).FirstDrawLine = first;
(Global.Emulator as NES).LastDrawLine = last;
if (pal)
{
(Global.Emulator as NES).PAL_FirstDrawLine = first;
(Global.Emulator as NES).PAL_LastDrawLine = last;
}
else
{
(Global.Emulator as NES).NTSC_FirstDrawLine = first;
(Global.Emulator as NES).NTSC_LastDrawLine = last;
}
}
}
public int nes_gettopscanline()
public int nes_gettopscanline(bool pal = false)
{
return Global.Config.NESTopLine;
if (pal)
{
return Global.Config.PAL_NESTopLine;
}
else
{
return Global.Config.NTSC_NESTopLine;
}
}
public int nes_getbottomscanline()
public int nes_getbottomscanline(bool pal = false)
{
return Global.Config.NESBottomLine;
if (pal)
{
return Global.Config.PAL_NESBottomLine;
}
else
{
return Global.Config.NTSC_NESBottomLine;
}
}
public bool nes_getclipleftandright()

View File

@ -2005,8 +2005,10 @@ namespace BizHawk.MultiClient
NES nes = new NES(nextComm, game, rom.FileData, bios);
nes.SoundOn = Global.Config.SoundEnabled;
nes.FirstDrawLine = Global.Config.NESTopLine;
nes.LastDrawLine = Global.Config.NESBottomLine;
nes.NTSC_FirstDrawLine = Global.Config.NTSC_NESTopLine;
nes.NTSC_LastDrawLine = Global.Config.NTSC_NESBottomLine;
nes.PAL_FirstDrawLine = Global.Config.PAL_NESTopLine;
nes.NTSC_LastDrawLine = Global.Config.PAL_NESBottomLine;
nes.SetClipLeftAndRight(Global.Config.NESClipLeftAndRight);
nextEmulator = nes;
if (Global.Config.NESAutoLoadPalette && Global.Config.NESPaletteFile.Length > 0 &&

View File

@ -41,8 +41,8 @@
this.btnAreaStandard = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.LastLineNumeric = new System.Windows.Forms.NumericUpDown();
this.FirstLineNumeric = new System.Windows.Forms.NumericUpDown();
this.NTSC_LastLineNumeric = new System.Windows.Forms.NumericUpDown();
this.NTSC_FirstLineNumeric = new System.Windows.Forms.NumericUpDown();
this.ClipLeftAndRightCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.checkUseBackdropColor = new System.Windows.Forms.CheckBox();
@ -55,18 +55,24 @@
this.DispSprites = new System.Windows.Forms.CheckBox();
this.BGColorDialog = new System.Windows.Forms.ColorDialog();
this.RestoreDefaultsButton = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.PAL_LastLineNumeric = new System.Windows.Forms.NumericUpDown();
this.PAL_FirstLineNumeric = new System.Windows.Forms.NumericUpDown();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LastLineNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.FirstLineNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NTSC_LastLineNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NTSC_FirstLineNumeric)).BeginInit();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PAL_LastLineNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PAL_FirstLineNumeric)).BeginInit();
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(213, 372);
this.OK.Location = new System.Drawing.Point(213, 385);
this.OK.Name = "OK";
this.OK.Size = new System.Drawing.Size(75, 23);
this.OK.TabIndex = 70;
@ -78,7 +84,7 @@
//
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.Location = new System.Drawing.Point(294, 372);
this.Cancel.Location = new System.Drawing.Point(294, 385);
this.Cancel.Name = "Cancel";
this.Cancel.Size = new System.Drawing.Size(75, 23);
this.Cancel.TabIndex = 75;
@ -88,7 +94,7 @@
// AllowMoreSprites
//
this.AllowMoreSprites.AutoSize = true;
this.AllowMoreSprites.Location = new System.Drawing.Point(143, 17);
this.AllowMoreSprites.Location = new System.Drawing.Point(134, 96);
this.AllowMoreSprites.Name = "AllowMoreSprites";
this.AllowMoreSprites.Size = new System.Drawing.Size(203, 17);
this.AllowMoreSprites.TabIndex = 23;
@ -155,24 +161,28 @@
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.PAL_LastLineNumeric);
this.groupBox2.Controls.Add(this.PAL_FirstLineNumeric);
this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.btnAreaFull);
this.groupBox2.Controls.Add(this.btnAreaStandard);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.LastLineNumeric);
this.groupBox2.Controls.Add(this.FirstLineNumeric);
this.groupBox2.Controls.Add(this.NTSC_LastLineNumeric);
this.groupBox2.Controls.Add(this.NTSC_FirstLineNumeric);
this.groupBox2.Controls.Add(this.ClipLeftAndRightCheckBox);
this.groupBox2.Controls.Add(this.AllowMoreSprites);
this.groupBox2.Location = new System.Drawing.Point(12, 113);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(352, 134);
this.groupBox2.Size = new System.Drawing.Size(352, 150);
this.groupBox2.TabIndex = 4;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Drawing Area";
//
// btnAreaFull
//
this.btnAreaFull.Location = new System.Drawing.Point(12, 99);
this.btnAreaFull.Location = new System.Drawing.Point(7, 115);
this.btnAreaFull.Name = "btnAreaFull";
this.btnAreaFull.Size = new System.Drawing.Size(94, 23);
this.btnAreaFull.TabIndex = 40;
@ -182,7 +192,7 @@
//
// btnAreaStandard
//
this.btnAreaStandard.Location = new System.Drawing.Point(12, 71);
this.btnAreaStandard.Location = new System.Drawing.Point(8, 92);
this.btnAreaStandard.Name = "btnAreaStandard";
this.btnAreaStandard.Size = new System.Drawing.Size(94, 23);
this.btnAreaStandard.TabIndex = 35;
@ -193,7 +203,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(4, 47);
this.label4.Location = new System.Drawing.Point(4, 69);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(49, 13);
this.label4.TabIndex = 24;
@ -202,50 +212,50 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(5, 21);
this.label3.Location = new System.Drawing.Point(5, 43);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(48, 13);
this.label3.TabIndex = 23;
this.label3.Text = "First line:";
//
// LastLineNumeric
// NTSC_LastLineNumeric
//
this.LastLineNumeric.Location = new System.Drawing.Point(59, 45);
this.LastLineNumeric.Maximum = new decimal(new int[] {
this.NTSC_LastLineNumeric.Location = new System.Drawing.Point(59, 67);
this.NTSC_LastLineNumeric.Maximum = new decimal(new int[] {
239,
0,
0,
0});
this.LastLineNumeric.Minimum = new decimal(new int[] {
this.NTSC_LastLineNumeric.Minimum = new decimal(new int[] {
128,
0,
0,
0});
this.LastLineNumeric.Name = "LastLineNumeric";
this.LastLineNumeric.Size = new System.Drawing.Size(47, 20);
this.LastLineNumeric.TabIndex = 28;
this.LastLineNumeric.Value = new decimal(new int[] {
this.NTSC_LastLineNumeric.Name = "NTSC_LastLineNumeric";
this.NTSC_LastLineNumeric.Size = new System.Drawing.Size(47, 20);
this.NTSC_LastLineNumeric.TabIndex = 28;
this.NTSC_LastLineNumeric.Value = new decimal(new int[] {
128,
0,
0,
0});
//
// FirstLineNumeric
// NTSC_FirstLineNumeric
//
this.FirstLineNumeric.Location = new System.Drawing.Point(59, 19);
this.FirstLineNumeric.Maximum = new decimal(new int[] {
this.NTSC_FirstLineNumeric.Location = new System.Drawing.Point(59, 41);
this.NTSC_FirstLineNumeric.Maximum = new decimal(new int[] {
127,
0,
0,
0});
this.FirstLineNumeric.Name = "FirstLineNumeric";
this.FirstLineNumeric.Size = new System.Drawing.Size(47, 20);
this.FirstLineNumeric.TabIndex = 21;
this.NTSC_FirstLineNumeric.Name = "NTSC_FirstLineNumeric";
this.NTSC_FirstLineNumeric.Size = new System.Drawing.Size(47, 20);
this.NTSC_FirstLineNumeric.TabIndex = 21;
//
// ClipLeftAndRightCheckBox
//
this.ClipLeftAndRightCheckBox.AutoSize = true;
this.ClipLeftAndRightCheckBox.Location = new System.Drawing.Point(143, 47);
this.ClipLeftAndRightCheckBox.Location = new System.Drawing.Point(134, 119);
this.ClipLeftAndRightCheckBox.Name = "ClipLeftAndRightCheckBox";
this.ClipLeftAndRightCheckBox.Size = new System.Drawing.Size(186, 17);
this.ClipLeftAndRightCheckBox.TabIndex = 30;
@ -263,7 +273,7 @@
this.groupBox3.Controls.Add(this.groupBox4);
this.groupBox3.Controls.Add(this.DispBackground);
this.groupBox3.Controls.Add(this.DispSprites);
this.groupBox3.Location = new System.Drawing.Point(12, 253);
this.groupBox3.Location = new System.Drawing.Point(12, 266);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(352, 113);
this.groupBox3.TabIndex = 5;
@ -354,7 +364,7 @@
// RestoreDefaultsButton
//
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, 372);
this.RestoreDefaultsButton.Location = new System.Drawing.Point(12, 385);
this.RestoreDefaultsButton.Name = "RestoreDefaultsButton";
this.RestoreDefaultsButton.Size = new System.Drawing.Size(102, 23);
this.RestoreDefaultsButton.TabIndex = 65;
@ -362,13 +372,65 @@
this.RestoreDefaultsButton.UseVisualStyleBackColor = true;
this.RestoreDefaultsButton.Click += new System.EventHandler(this.RestoreDefaultsButton_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(62, 22);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(36, 13);
this.label5.TabIndex = 41;
this.label5.Text = "NTSC";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(131, 22);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(27, 13);
this.label6.TabIndex = 44;
this.label6.Text = "PAL";
//
// PAL_LastLineNumeric
//
this.PAL_LastLineNumeric.Location = new System.Drawing.Point(124, 67);
this.PAL_LastLineNumeric.Maximum = new decimal(new int[] {
239,
0,
0,
0});
this.PAL_LastLineNumeric.Minimum = new decimal(new int[] {
128,
0,
0,
0});
this.PAL_LastLineNumeric.Name = "PAL_LastLineNumeric";
this.PAL_LastLineNumeric.Size = new System.Drawing.Size(47, 20);
this.PAL_LastLineNumeric.TabIndex = 43;
this.PAL_LastLineNumeric.Value = new decimal(new int[] {
128,
0,
0,
0});
//
// PAL_FirstLineNumeric
//
this.PAL_FirstLineNumeric.Location = new System.Drawing.Point(124, 41);
this.PAL_FirstLineNumeric.Maximum = new decimal(new int[] {
127,
0,
0,
0});
this.PAL_FirstLineNumeric.Name = "PAL_FirstLineNumeric";
this.PAL_FirstLineNumeric.Size = new System.Drawing.Size(47, 20);
this.PAL_FirstLineNumeric.TabIndex = 42;
//
// NESGraphicsConfig
//
this.AcceptButton = this.OK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.Cancel;
this.ClientSize = new System.Drawing.Size(373, 396);
this.ClientSize = new System.Drawing.Size(373, 409);
this.Controls.Add(this.RestoreDefaultsButton);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
@ -376,7 +438,7 @@
this.Controls.Add(this.Cancel);
this.Controls.Add(this.OK);
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(389, 434);
this.MaximumSize = new System.Drawing.Size(389, 494);
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(389, 434);
this.Name = "NESGraphicsConfig";
@ -388,11 +450,13 @@
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.LastLineNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.FirstLineNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NTSC_LastLineNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NTSC_FirstLineNumeric)).EndInit();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.PAL_LastLineNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PAL_FirstLineNumeric)).EndInit();
this.ResumeLayout(false);
}
@ -419,12 +483,16 @@
private System.Windows.Forms.Button ChangeBGColor;
private System.Windows.Forms.ColorDialog BGColorDialog;
private System.Windows.Forms.CheckBox checkUseBackdropColor;
private System.Windows.Forms.NumericUpDown FirstLineNumeric;
private System.Windows.Forms.NumericUpDown LastLineNumeric;
private System.Windows.Forms.NumericUpDown NTSC_FirstLineNumeric;
private System.Windows.Forms.NumericUpDown NTSC_LastLineNumeric;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnAreaFull;
private System.Windows.Forms.Button btnAreaStandard;
private System.Windows.Forms.Button RestoreDefaultsButton;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.NumericUpDown PAL_LastLineNumeric;
private System.Windows.Forms.NumericUpDown PAL_FirstLineNumeric;
private System.Windows.Forms.Label label5;
}
}

View File

@ -35,8 +35,10 @@ namespace BizHawk.MultiClient
private void LoadStuff()
{
FirstLineNumeric.Value = Global.Config.NESTopLine;
LastLineNumeric.Value = Global.Config.NESBottomLine;
NTSC_FirstLineNumeric.Value = Global.Config.NTSC_NESTopLine;
NTSC_LastLineNumeric.Value = Global.Config.NTSC_NESBottomLine;
PAL_FirstLineNumeric.Value = Global.Config.PAL_NESTopLine;
PAL_LastLineNumeric.Value = Global.Config.PAL_NESBottomLine;
AllowMoreSprites.Checked = Global.Config.NESAllowMoreThanEightSprites;
ClipLeftAndRightCheckBox.Checked = Global.Config.NESClipLeftAndRight;
AutoLoadPalette.Checked = Global.Config.NESAutoLoadPalette;
@ -86,10 +88,18 @@ namespace BizHawk.MultiClient
Global.OSD.AddMessage("Standard Palette set");
}
Global.Config.NESTopLine = (int)FirstLineNumeric.Value;
Global.Config.NESBottomLine = (int)LastLineNumeric.Value;
nes.FirstDrawLine = (int)FirstLineNumeric.Value;
nes.LastDrawLine = (int)LastLineNumeric.Value;
Global.Config.NTSC_NESTopLine = (int)NTSC_FirstLineNumeric.Value;
nes.NTSC_FirstDrawLine = (int)NTSC_FirstLineNumeric.Value;
Global.Config.NTSC_NESBottomLine = (int)NTSC_LastLineNumeric.Value;
nes.NTSC_LastDrawLine = (int)NTSC_LastLineNumeric.Value;
Global.Config.PAL_NESTopLine = (int)PAL_FirstLineNumeric.Value;
nes.PAL_FirstDrawLine = (int)PAL_FirstLineNumeric.Value;
Global.Config.PAL_NESBottomLine = (int)PAL_LastLineNumeric.Value;
nes.PAL_LastDrawLine = (int)PAL_LastLineNumeric.Value;
Global.Config.NESAllowMoreThanEightSprites = AllowMoreSprites.Checked;
Global.Config.NESClipLeftAndRight = ClipLeftAndRightCheckBox.Checked;
nes.SetClipLeftAndRight(ClipLeftAndRightCheckBox.Checked);
@ -125,14 +135,14 @@ namespace BizHawk.MultiClient
private void btnAreaStandard_Click(object sender, EventArgs e)
{
FirstLineNumeric.Value = 8;
LastLineNumeric.Value = 231;
NTSC_FirstLineNumeric.Value = 8;
NTSC_LastLineNumeric.Value = 231;
}
private void btnAreaFull_Click(object sender, EventArgs e)
{
FirstLineNumeric.Value = 0;
LastLineNumeric.Value = 239;
NTSC_FirstLineNumeric.Value = 0;
NTSC_LastLineNumeric.Value = 239;
}
private void BackgroundColorPanel_DoubleClick(object sender, EventArgs e)
@ -142,8 +152,10 @@ namespace BizHawk.MultiClient
private void RestoreDefaultsButton_Click(object sender, EventArgs e)
{
FirstLineNumeric.Value = 8;
LastLineNumeric.Value = 231;
NTSC_FirstLineNumeric.Value = 8;
NTSC_LastLineNumeric.Value = 231;
PAL_FirstLineNumeric.Value = 0;
PAL_LastLineNumeric.Value = 239;
AllowMoreSprites.Checked = false;
ClipLeftAndRightCheckBox.Checked = false;
AutoLoadPalette.Checked = true;