From 1d4a8fd3ba283d7577c48b9ff7deb7fd80ad10a8 Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 30 Oct 2012 23:38:53 +0000 Subject: [PATCH] Atari 2600 - add a Playfield toggle --- BizHawk.Emulation/Consoles/Atari/2600/TIA.cs | 2 +- BizHawk.Emulation/Interfaces/CoreComms.cs | 6 +++--- BizHawk.MultiClient/Config.cs | 1 + BizHawk.MultiClient/MainForm.Designer.cs | 10 ++++++++++ BizHawk.MultiClient/MainForm.MenuItems.cs | 1 + BizHawk.MultiClient/MainForm.cs | 9 ++++++++- 6 files changed, 24 insertions(+), 5 deletions(-) diff --git a/BizHawk.Emulation/Consoles/Atari/2600/TIA.cs b/BizHawk.Emulation/Consoles/Atari/2600/TIA.cs index 0f4ecdfbc8..eab836771f 100644 --- a/BizHawk.Emulation/Consoles/Atari/2600/TIA.cs +++ b/BizHawk.Emulation/Consoles/Atari/2600/TIA.cs @@ -704,7 +704,7 @@ namespace BizHawk.Emulation.Consoles.Atari pixelColor = palette[playField.bkColor]; } - if ((collisions & CXPF) != 0) // && core.CoreInputComm.Atari2600_ShowPF) + if ((collisions & CXPF) != 0 && core.CoreInputComm.Atari2600_ShowPF) { if (playField.score) { diff --git a/BizHawk.Emulation/Interfaces/CoreComms.cs b/BizHawk.Emulation/Interfaces/CoreComms.cs index 823a9037fa..81af535655 100644 --- a/BizHawk.Emulation/Interfaces/CoreComms.cs +++ b/BizHawk.Emulation/Interfaces/CoreComms.cs @@ -8,15 +8,15 @@ namespace BizHawk public bool NES_ShowBG, NES_ShowOBJ; public bool PCE_ShowBG1, PCE_ShowOBJ1, PCE_ShowBG2, PCE_ShowOBJ2; public bool SMS_ShowBG, SMS_ShowOBJ; - public bool GG_ShowClippedRegions; - public bool GG_HighlightActiveDisplayRegion; + public bool GG_ShowClippedRegions; + public bool GG_HighlightActiveDisplayRegion; public string SNES_FirmwaresPath; public bool SNES_ShowBG1_0, SNES_ShowBG2_0, SNES_ShowBG3_0, SNES_ShowBG4_0; public bool SNES_ShowBG1_1, SNES_ShowBG2_1, SNES_ShowBG3_1, SNES_ShowBG4_1; public bool SNES_ShowOBJ_0, SNES_ShowOBJ_1, SNES_ShowOBJ_2, SNES_ShowOBJ_3; - public bool Atari2600_ShowBG, Atari2600_ShowPlayer1, Atari2600_ShowPlayer2, Atari2600_ShowMissle1, Atari2600_ShowMissle2, Atari2600_ShowBall; + public bool Atari2600_ShowBG, Atari2600_ShowPlayer1, Atari2600_ShowPlayer2, Atari2600_ShowMissle1, Atari2600_ShowMissle2, Atari2600_ShowBall, Atari2600_ShowPF; /// /// if this is set, then the cpu should dump trace info to CpuTraceStream diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index f9264a5735..37315ffe29 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -700,6 +700,7 @@ namespace BizHawk.MultiClient public bool Atari2600_ShowMissle1 = true; public bool Atari2600_ShowMissle2 = true; public bool Atari2600_ShowBall = true; + public bool Atari2600_ShowPlayfield = true; } public class SMSControllerTemplate diff --git a/BizHawk.MultiClient/MainForm.Designer.cs b/BizHawk.MultiClient/MainForm.Designer.cs index 019bb9d85a..8c4c40edfc 100644 --- a/BizHawk.MultiClient/MainForm.Designer.cs +++ b/BizHawk.MultiClient/MainForm.Designer.cs @@ -305,6 +305,7 @@ this.cmiScreenshotClipboard = new System.Windows.Forms.ToolStripMenuItem(); this.cmiCloseRom = new System.Windows.Forms.ToolStripMenuItem(); this.cmiShowMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.showPlayfieldToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.StatusSlot0.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); @@ -2023,6 +2024,7 @@ this.rightDifficultyToolStripMenuItem, this.toolStripSeparator26, this.showBGToolStripMenuItem, + this.showPlayfieldToolStripMenuItem, this.showPlayer1ToolStripMenuItem, this.showPlayer2ToolStripMenuItem, this.showMissle1ToolStripMenuItem, @@ -2636,6 +2638,13 @@ this.cmiShowMenu.Text = "Show Menu"; this.cmiShowMenu.Click += new System.EventHandler(this.showMenuToolStripMenuItem_Click); // + // showPlayfieldToolStripMenuItem + // + this.showPlayfieldToolStripMenuItem.Name = "showPlayfieldToolStripMenuItem"; + this.showPlayfieldToolStripMenuItem.Size = new System.Drawing.Size(153, 22); + this.showPlayfieldToolStripMenuItem.Text = "Show Playfield"; + this.showPlayfieldToolStripMenuItem.Click += new System.EventHandler(this.showPlayfieldToolStripMenuItem_Click); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F); @@ -2952,6 +2961,7 @@ private System.Windows.Forms.ToolStripMenuItem showMissle1ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem showMissle2ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem showBallToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem showPlayfieldToolStripMenuItem; } } diff --git a/BizHawk.MultiClient/MainForm.MenuItems.cs b/BizHawk.MultiClient/MainForm.MenuItems.cs index f3350125e3..6e22bcc8e0 100644 --- a/BizHawk.MultiClient/MainForm.MenuItems.cs +++ b/BizHawk.MultiClient/MainForm.MenuItems.cs @@ -1738,6 +1738,7 @@ namespace BizHawk.MultiClient showMissle1ToolStripMenuItem.Checked = Global.Config.Atari2600_ShowMissle1; showMissle2ToolStripMenuItem.Checked = Global.Config.Atari2600_ShowMissle2; showBallToolStripMenuItem.Checked = Global.Config.Atari2600_ShowBall; + showPlayfieldToolStripMenuItem.Checked = Global.Config.Atari2600_ShowPlayfield; } private void skipBIOSIntroToolStripMenuItem_Click(object sender, EventArgs e) diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index db0eb6f9f9..b8644d6954 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -377,12 +377,13 @@ namespace BizHawk.MultiClient Global.CoreInputComm.GG_HighlightActiveDisplayRegion = Global.Config.GGHighlightActiveDisplayRegion; Global.CoreInputComm.GG_ShowClippedRegions = Global.Config.GGShowClippedRegions; - Global.CoreInputComm.Atari2600_ShowBG = Global.Config.Atari2600_ShowBG; + Global.CoreInputComm.Atari2600_ShowBG = Global.Config.Atari2600_ShowBG; Global.CoreInputComm.Atari2600_ShowPlayer1 = Global.Config.Atari2600_ShowPlayer1; Global.CoreInputComm.Atari2600_ShowPlayer2 = Global.Config.Atari2600_ShowPlayer2; Global.CoreInputComm.Atari2600_ShowMissle1 = Global.Config.Atari2600_ShowMissle1; Global.CoreInputComm.Atari2600_ShowMissle2 = Global.Config.Atari2600_ShowMissle2; Global.CoreInputComm.Atari2600_ShowBall = Global.Config.Atari2600_ShowBall; + Global.CoreInputComm.Atari2600_ShowPF = Global.Config.Atari2600_ShowPlayfield; } void SyncPresentationMode() @@ -4209,5 +4210,11 @@ namespace BizHawk.MultiClient Global.Config.Atari2600_ShowBall ^= true; SyncCoreInputComm(); } + + private void showPlayfieldToolStripMenuItem_Click(object sender, EventArgs e) + { + Global.Config.Atari2600_ShowPlayfield ^= true; + SyncCoreInputComm(); + } } }