Set up a blank NES PPU viewer in a NEStools folder. Make a NES menu item that will appear only when a NES game is loaded

This commit is contained in:
andres.delikat 2011-03-02 17:12:48 +00:00
parent 7cdda17b2d
commit 705a7f6cce
4 changed files with 83 additions and 11 deletions

View File

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion> <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DD448B37-BA3F-4544-9754-5406E8094723}</ProjectGuid> <ProjectGuid>{DD448B37-BA3F-4544-9754-5406E8094723}</ProjectGuid>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
@ -122,6 +122,12 @@
<Compile Include="NameStateForm.Designer.cs"> <Compile Include="NameStateForm.Designer.cs">
<DependentUpon>NameStateForm.cs</DependentUpon> <DependentUpon>NameStateForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="NEStools\NESPPU.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="NEStools\NESPPU.Designer.cs">
<DependentUpon>NESPPU.cs</DependentUpon>
</Compile>
<Compile Include="PlayMovie.cs"> <Compile Include="PlayMovie.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -256,6 +262,10 @@
<EmbeddedResource Include="images\BuilderDialog_moveup.bmp" /> <EmbeddedResource Include="images\BuilderDialog_moveup.bmp" />
<EmbeddedResource Include="images\InserSeparator.bmp" /> <EmbeddedResource Include="images\InserSeparator.bmp" />
<EmbeddedResource Include="images\search.ico" /> <EmbeddedResource Include="images\search.ico" />
<EmbeddedResource Include="NEStools\NESPPU.resx">
<DependentUpon>NESPPU.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="PlayMovie.resx"> <EmbeddedResource Include="PlayMovie.resx">
<DependentUpon>PlayMovie.cs</DependentUpon> <DependentUpon>PlayMovie.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>

View File

@ -88,6 +88,7 @@
this.playMovieToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.playMovieToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.stopMovieToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.stopMovieToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.playFromBeginningToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.playFromBeginningToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.replayInputLogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.screenshotF12ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.screenshotF12ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -157,7 +158,10 @@
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.replayInputLogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.nESToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pPUViewerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.nameTableViewerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.gameGenieCodesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -169,6 +173,7 @@
this.viewToolStripMenuItem, this.viewToolStripMenuItem,
this.configToolStripMenuItem, this.configToolStripMenuItem,
this.toolsToolStripMenuItem, this.toolsToolStripMenuItem,
this.nESToolStripMenuItem,
this.helpToolStripMenuItem}); this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Name = "menuStrip1";
@ -654,6 +659,13 @@
this.playFromBeginningToolStripMenuItem.Text = "Play from Beginning"; this.playFromBeginningToolStripMenuItem.Text = "Play from Beginning";
this.playFromBeginningToolStripMenuItem.Click += new System.EventHandler(this.playFromBeginningToolStripMenuItem_Click); this.playFromBeginningToolStripMenuItem.Click += new System.EventHandler(this.playFromBeginningToolStripMenuItem_Click);
// //
// replayInputLogToolStripMenuItem
//
this.replayInputLogToolStripMenuItem.Name = "replayInputLogToolStripMenuItem";
this.replayInputLogToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
this.replayInputLogToolStripMenuItem.Text = "Replay Input Log";
this.replayInputLogToolStripMenuItem.Click += new System.EventHandler(this.replayInputLogToolStripMenuItem_Click);
//
// screenshotF12ToolStripMenuItem // screenshotF12ToolStripMenuItem
// //
this.screenshotF12ToolStripMenuItem.Name = "screenshotF12ToolStripMenuItem"; this.screenshotF12ToolStripMenuItem.Name = "screenshotF12ToolStripMenuItem";
@ -1177,23 +1189,47 @@
// //
this.helpToolStripMenuItem1.Enabled = false; this.helpToolStripMenuItem1.Enabled = false;
this.helpToolStripMenuItem1.Name = "helpToolStripMenuItem1"; this.helpToolStripMenuItem1.Name = "helpToolStripMenuItem1";
this.helpToolStripMenuItem1.Size = new System.Drawing.Size(114, 22); this.helpToolStripMenuItem1.Size = new System.Drawing.Size(152, 22);
this.helpToolStripMenuItem1.Text = "&Help"; this.helpToolStripMenuItem1.Text = "&Help";
this.helpToolStripMenuItem1.Click += new System.EventHandler(this.helpToolStripMenuItem1_Click); this.helpToolStripMenuItem1.Click += new System.EventHandler(this.helpToolStripMenuItem1_Click);
// //
// aboutToolStripMenuItem // aboutToolStripMenuItem
// //
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(114, 22); this.aboutToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.aboutToolStripMenuItem.Text = "&About"; this.aboutToolStripMenuItem.Text = "&About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
// //
// replayInputLogToolStripMenuItem // nESToolStripMenuItem
// //
this.replayInputLogToolStripMenuItem.Name = "replayInputLogToolStripMenuItem"; this.nESToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.replayInputLogToolStripMenuItem.Size = new System.Drawing.Size(179, 22); this.pPUViewerToolStripMenuItem,
this.replayInputLogToolStripMenuItem.Text = "Replay Input Log"; this.nameTableViewerToolStripMenuItem,
this.replayInputLogToolStripMenuItem.Click += new System.EventHandler(this.replayInputLogToolStripMenuItem_Click); this.gameGenieCodesToolStripMenuItem});
this.nESToolStripMenuItem.Name = "nESToolStripMenuItem";
this.nESToolStripMenuItem.Size = new System.Drawing.Size(38, 20);
this.nESToolStripMenuItem.Text = "&NES";
//
// pPUViewerToolStripMenuItem
//
this.pPUViewerToolStripMenuItem.Name = "pPUViewerToolStripMenuItem";
this.pPUViewerToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
this.pPUViewerToolStripMenuItem.Text = "&PPU Viewer";
this.pPUViewerToolStripMenuItem.Click += new System.EventHandler(this.pPUViewerToolStripMenuItem_Click);
//
// nameTableViewerToolStripMenuItem
//
this.nameTableViewerToolStripMenuItem.Enabled = false;
this.nameTableViewerToolStripMenuItem.Name = "nameTableViewerToolStripMenuItem";
this.nameTableViewerToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
this.nameTableViewerToolStripMenuItem.Text = "&Name Table Viewer";
//
// gameGenieCodesToolStripMenuItem
//
this.gameGenieCodesToolStripMenuItem.Enabled = false;
this.gameGenieCodesToolStripMenuItem.Name = "gameGenieCodesToolStripMenuItem";
this.gameGenieCodesToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
this.gameGenieCodesToolStripMenuItem.Text = "&Game Genie Codes";
// //
// MainForm // MainForm
// //
@ -1346,6 +1382,10 @@
private System.Windows.Forms.ToolStripMenuItem saveConfigToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveConfigToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem loadConfigToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem loadConfigToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem replayInputLogToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem replayInputLogToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem nESToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem pPUViewerToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem nameTableViewerToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem gameGenieCodesToolStripMenuItem;
} }
} }

View File

@ -252,6 +252,7 @@ namespace BizHawk.MultiClient
Global.Emulator = new NullEmulator(); Global.Emulator = new NullEmulator();
RamSearch1.Restart(); RamSearch1.Restart();
Text = "BizHawk"; Text = "BizHawk";
HandlePlatformMenus("");
} }
private void saveStateToolStripMenuItem_Click(object sender, EventArgs e) private void saveStateToolStripMenuItem_Click(object sender, EventArgs e)

View File

@ -369,6 +369,19 @@ namespace BizHawk.MultiClient
return ""; return "";
} }
private void HandlePlatformMenus(string system)
{
switch (system)
{
case "NES":
nESToolStripMenuItem.Visible = true;
break;
default:
nESToolStripMenuItem.Visible = false;
break;
}
}
private bool LoadRom(string path) private bool LoadRom(string path)
{ {
var file = new FileInfo(path); var file = new FileInfo(path);
@ -423,7 +436,8 @@ namespace BizHawk.MultiClient
{ {
throw new Exception(); throw new Exception();
} }
HandlePlatformMenus(Global.Game.System);
Global.Emulator.LoadGame(game); Global.Emulator.LoadGame(game);
Text = DisplayNameForSystem(game.System) + " - " + game.Name; Text = DisplayNameForSystem(game.System) + " - " + game.Name;
ResetRewindBuffer(); ResetRewindBuffer();
@ -1044,7 +1058,8 @@ namespace BizHawk.MultiClient
private void MainForm_Load(object sender, EventArgs e) private void MainForm_Load(object sender, EventArgs e)
{ {
//Hide platform specific menus until an appropriate ROM is loaded
nESToolStripMenuItem.Visible = false;
} }
private void frameSkipToolStripMenuItem_DropDownOpened(object sender, EventArgs e) private void frameSkipToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
@ -1108,5 +1123,11 @@ namespace BizHawk.MultiClient
InputLog.StartPlayback(); InputLog.StartPlayback();
LoadRom(CurrentlyOpenRom); LoadRom(CurrentlyOpenRom);
} }
private void pPUViewerToolStripMenuItem_Click(object sender, EventArgs e)
{
NESPPU n = new NESPPU();
n.Show();
}
} }
} }