hook up nes dump status stuff, and also add a log window that we could use for console output in the near future but for now is just used to show you a detailed rom analysis report

This commit is contained in:
zeromus 2011-07-10 21:00:28 +00:00
parent b832d0f331
commit 9628ab3506
11 changed files with 435 additions and 94 deletions

View File

@ -216,6 +216,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
public class CartInfo
{
public GameInfo game;
public BizHawk.GameInfo DB_GameInfo;
public short chr_size;
public short prg_size;
@ -291,6 +292,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
//try generating a bootgod cart descriptor from the game database
var dict = gi.ParseOptionsDictionary();
game.name = gi.Name;
cart.DB_GameInfo = gi;
cart.game = game;
cart.board_type = dict["board"];
if (dict.ContainsKey("PRG"))

View File

@ -349,10 +349,19 @@ namespace BizHawk.Emulation.Consoles.Nintendo
None, BootGodDB, GameDB, INES
}
StringWriter LoadReport;
void LoadWriteLine(string format, params object[] arg)
{
Console.WriteLine(format, arg);
LoadReport.WriteLine(format, arg);
}
void LoadWriteLine(object arg) { LoadWriteLine("{0}",arg); }
public unsafe void LoadGame(IGame game)
{
Console.WriteLine("------");
Console.WriteLine("BEGIN NES rom analysis:");
LoadReport = new StringWriter();
LoadWriteLine("------");
LoadWriteLine("BEGIN NES rom analysis:");
byte[] file = game.GetFileData();
if (file.Length < 16) throw new Exception("Alleged NES rom too small to be anything useful");
if (file.Take(4).SequenceEqual(System.Text.Encoding.ASCII.GetBytes("UNIF")))
@ -379,12 +388,12 @@ namespace BizHawk.Emulation.Consoles.Nintendo
hash_md5 = "md5:" + Util.BytesToHexString(md5.Hash);
}
Console.WriteLine("Found iNES header:");
LoadWriteLine("Found iNES header:");
CartInfo iNesHeaderInfo = header->Analyze();
Console.WriteLine("Since this is iNES we can confidently parse PRG/CHR banks to hash.");
LoadWriteLine("Since this is iNES we can confidently parse PRG/CHR banks to hash.");
Console.WriteLine("headerless rom hash: {0}", hash_sha1);
Console.WriteLine("headerless rom hash: {0}", hash_md5);
LoadWriteLine("headerless rom hash: {0}", hash_sha1);
LoadWriteLine("headerless rom hash: {0}", hash_md5);
Type boardType = null;
CartInfo choice = null;
@ -392,7 +401,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
choice = IdentifyFromBootGodDB(hash_sha1);
if (choice == null)
{
Console.WriteLine("Could not locate game in nescartdb");
LoadWriteLine("Could not locate game in nescartdb");
if (USE_DATABASE)
{
choice = IdentifyFromGameDB(hash_md5);
@ -403,8 +412,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo
}
if (choice == null)
{
Console.WriteLine("Could not locate game in bizhawk gamedb");
Console.WriteLine("Attempting inference from iNES header");
LoadWriteLine("Could not locate game in bizhawk gamedb");
LoadWriteLine("Attempting inference from iNES header");
choice = iNesHeaderInfo;
string iNES_board = iNESBoardDetector.Detect(choice);
if (iNES_board == null)
@ -427,23 +436,23 @@ namespace BizHawk.Emulation.Consoles.Nintendo
}
catch { }
if (boardType != null)
Console.WriteLine("Ambiguous iNES wram size resolved as {0}k", choice.wram_size);
LoadWriteLine("Ambiguous iNES wram size resolved as {0}k", choice.wram_size);
}
Console.WriteLine("Chose board from iNES heuristics: " + iNES_board);
LoadWriteLine("Chose board from iNES heuristics: " + iNES_board);
choice.game.name = game.Name;
origin = EDetectionOrigin.INES;
}
else
{
origin = EDetectionOrigin.GameDB;
Console.WriteLine("Chose board from bizhawk gamedb: " + choice.board_type);
LoadWriteLine("Chose board from bizhawk gamedb: " + choice.board_type);
}
}
else
{
Console.WriteLine("Chose board from nescartdb:");
Console.WriteLine(choice);
LoadWriteLine("Chose board from nescartdb:");
LoadWriteLine(choice);
origin = EDetectionOrigin.BootGodDB;
}
@ -455,18 +464,22 @@ namespace BizHawk.Emulation.Consoles.Nintendo
if (boardType == null)
throw new Exception("No class implements the necessary board type: " + choice.board_type);
Console.WriteLine("Final game detection results:");
Console.WriteLine(choice);
Console.WriteLine("\"" + game_name + "\"");
Console.WriteLine("Implemented by: class " + boardType.Name);
if(choice.DB_GameInfo != null)
if(choice.DB_GameInfo.Status == RomStatus.BadDump)
choice.bad = true;
LoadWriteLine("Final game detection results:");
LoadWriteLine(choice);
LoadWriteLine("\"" + game_name + "\"");
LoadWriteLine("Implemented by: class " + boardType.Name);
if (choice.bad)
{
Console.WriteLine("~~ ONE WAY OR ANOTHER, THIS DUMP IS KNOWN TO BE *BAD* ~~");
Console.WriteLine("~~ YOU SHOULD FIND A BETTER FILE ~~");
LoadWriteLine("~~ ONE WAY OR ANOTHER, THIS DUMP IS KNOWN TO BE *BAD* ~~");
LoadWriteLine("~~ YOU SHOULD FIND A BETTER FILE ~~");
}
Console.WriteLine("END NES rom analysis");
Console.WriteLine("------");
LoadWriteLine("END NES rom analysis");
LoadWriteLine("------");
board = (INESBoard)Activator.CreateInstance(boardType);
@ -474,6 +487,32 @@ namespace BizHawk.Emulation.Consoles.Nintendo
board.Create(this);
board.Configure(origin);
if (origin == EDetectionOrigin.BootGodDB)
{
CoreOutputComm.RomStatus = RomStatus.GoodDump;
CoreOutputComm.RomStatusAnnotation = "Identified from BootGod's database";
}
if (origin == EDetectionOrigin.INES)
{
CoreOutputComm.RomStatus = RomStatus.NotInDatabase;
CoreOutputComm.RomStatusAnnotation = "Inferred from iNES header; potentially wrong";
}
if (origin == EDetectionOrigin.GameDB)
{
if (choice.bad)
{
CoreOutputComm.RomStatus = RomStatus.BadDump;
}
else
{
CoreOutputComm.RomStatus = choice.DB_GameInfo.Status;
}
}
LoadReport.Flush();
CoreOutputComm.RomStatusDetails = LoadReport.ToString();
//create the board's rom and vrom
board.ROM = new byte[choice.prg_size * 1024];
Array.Copy(file, 16, board.ROM, 0, board.ROM.Length);
@ -492,6 +531,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
HardReset();
SetupMemoryDomains();
}
}
void SyncState(Serializer ser)

View File

@ -12,6 +12,9 @@ namespace BizHawk
public class CoreOutputComm
{
public double VsyncRate = 60;
public RomStatus RomStatus;
public string RomStatusAnnotation;
public string RomStatusDetails;
}
}

View File

@ -139,6 +139,12 @@
<Compile Include="Input\GamePad.cs" />
<Compile Include="Input\Input.cs" />
<Compile Include="LogConsole.cs" />
<Compile Include="LogWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="LogWindow.Designer.cs">
<DependentUpon>LogWindow.cs</DependentUpon>
</Compile>
<Compile Include="movie\EditCommentsForm.cs">
<SubType>Form</SubType>
</Compile>
@ -420,6 +426,9 @@
<EmbeddedResource Include="images\BuilderDialog_moveup.bmp" />
<EmbeddedResource Include="images\InserSeparator.bmp" />
<EmbeddedResource Include="images\search.ico" />
<EmbeddedResource Include="LogWindow.resx">
<DependentUpon>LogWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="movie\EditCommentsForm.resx">
<DependentUpon>EditCommentsForm.cs</DependentUpon>
</EmbeddedResource>

109
BizHawk.MultiClient/LogWindow.Designer.cs generated Normal file
View File

@ -0,0 +1,109 @@
namespace BizHawk.MultiClient
{
partial class LogWindow
{
/// <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.btnClose = new System.Windows.Forms.Button();
this.btnClear = new System.Windows.Forms.Button();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.textBox1 = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(590, 3);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 23);
this.btnClose.TabIndex = 2;
this.btnClose.Text = "Close";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// btnClear
//
this.btnClear.Location = new System.Drawing.Point(3, 3);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(75, 23);
this.btnClear.TabIndex = 1;
this.btnClear.Text = "Clear";
this.btnClear.UseVisualStyleBackColor = true;
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.AutoSize = true;
this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.Controls.Add(this.btnClear, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.btnClose, 2, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 273);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(668, 29);
this.tableLayoutPanel1.TabIndex = 5;
//
// textBox1
//
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox1.Location = new System.Drawing.Point(0, 0);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true;
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox1.Size = new System.Drawing.Size(668, 273);
this.textBox1.TabIndex = 6;
//
// LogWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(668, 302);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "LogWindow";
this.Text = "LogWindow";
this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.TextBox textBox1;
}
}

View File

@ -0,0 +1,38 @@
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;
namespace BizHawk.MultiClient
{
public partial class LogWindow : Form
{
public LogWindow()
{
InitializeComponent();
}
public void ShowReport(string title, string report)
{
Text = title;
textBox1.Text = report;
btnClear.Visible = false;
ShowDialog();
}
private void btnClear_Click(object sender, EventArgs e)
{
}
private void btnClose_Click(object sender, EventArgs e)
{
Close();
}
}
}

View File

@ -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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -202,7 +202,7 @@
this.helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.StatusSlot0 = new System.Windows.Forms.StatusStrip();
this.DumpError = new System.Windows.Forms.ToolStripDropDownButton();
this.DumpStatus = new System.Windows.Forms.ToolStripDropDownButton();
this.EmuStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.PlayRecordStatus = new System.Windows.Forms.ToolStripDropDownButton();
this.PauseStrip = new System.Windows.Forms.ToolStripDropDownButton();
@ -255,7 +255,7 @@
this.menuStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(470, 40);
this.menuStrip1.Size = new System.Drawing.Size(470, 21);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
this.menuStrip1.MenuDeactivate += new System.EventHandler(this.menuStrip1_MenuDeactivate);
@ -285,7 +285,7 @@
//
this.openROMToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.OpenFile;
this.openROMToolStripMenuItem.Name = "openROMToolStripMenuItem";
this.openROMToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.openROMToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.openROMToolStripMenuItem.Text = "Open ROM";
this.openROMToolStripMenuItem.Click += new System.EventHandler(this.openROMToolStripMenuItem_Click);
//
@ -298,7 +298,7 @@
this.autoloadMostRecentToolStripMenuItem});
this.recentROMToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Recent;
this.recentROMToolStripMenuItem.Name = "recentROMToolStripMenuItem";
this.recentROMToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.recentROMToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.recentROMToolStripMenuItem.Text = "Recent ROM";
this.recentROMToolStripMenuItem.DropDownOpened += new System.EventHandler(this.recentROMToolStripMenuItem_DropDownOpened);
//
@ -331,14 +331,14 @@
//
this.closeROMToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Close;
this.closeROMToolStripMenuItem.Name = "closeROMToolStripMenuItem";
this.closeROMToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.closeROMToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.closeROMToolStripMenuItem.Text = "&Close ROM";
this.closeROMToolStripMenuItem.Click += new System.EventHandler(this.closeROMToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(149, 6);
this.toolStripMenuItem1.Size = new System.Drawing.Size(142, 6);
//
// saveStateToolStripMenuItem
//
@ -356,7 +356,7 @@
this.toolStripSeparator6,
this.saveNamedStateToolStripMenuItem});
this.saveStateToolStripMenuItem.Name = "saveStateToolStripMenuItem";
this.saveStateToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.saveStateToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.saveStateToolStripMenuItem.Text = "Save State";
this.saveStateToolStripMenuItem.DropDownOpened += new System.EventHandler(this.saveStateToolStripMenuItem_DropDownOpened);
//
@ -458,7 +458,7 @@
this.toolStripSeparator7,
this.loadNamedStateToolStripMenuItem});
this.loadStateToolStripMenuItem.Name = "loadStateToolStripMenuItem";
this.loadStateToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.loadStateToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.loadStateToolStripMenuItem.Text = "Load State";
this.loadStateToolStripMenuItem.DropDownOpened += new System.EventHandler(this.loadStateToolStripMenuItem_DropDownOpened);
//
@ -563,7 +563,7 @@
this.saveToCurrentSlotToolStripMenuItem,
this.loadCurrentSlotToolStripMenuItem});
this.saveSlotToolStripMenuItem.Name = "saveSlotToolStripMenuItem";
this.saveSlotToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.saveSlotToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.saveSlotToolStripMenuItem.Text = "SaveSlot";
this.saveSlotToolStripMenuItem.DropDownOpened += new System.EventHandler(this.saveSlotToolStripMenuItem_DropDownOpened);
//
@ -673,7 +673,7 @@
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(149, 6);
this.toolStripMenuItem2.Size = new System.Drawing.Size(142, 6);
//
// movieToolStripMenuItem
//
@ -689,7 +689,7 @@
this.bindSavestatesToMoviesToolStripMenuItem,
this.automaticallyBackupMoviesToolStripMenuItem});
this.movieToolStripMenuItem.Name = "movieToolStripMenuItem";
this.movieToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.movieToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.movieToolStripMenuItem.Text = "Movie";
this.movieToolStripMenuItem.DropDownOpened += new System.EventHandler(this.movieToolStripMenuItem_DropDownOpened);
//
@ -799,7 +799,7 @@
this.screenshotF12ToolStripMenuItem,
this.screenshotAsToolStripMenuItem});
this.screenshotToolStripMenuItem.Name = "screenshotToolStripMenuItem";
this.screenshotToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.screenshotToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.screenshotToolStripMenuItem.Text = "Screenshot";
//
// screenshotF12ToolStripMenuItem
@ -820,13 +820,13 @@
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6);
this.toolStripSeparator4.Size = new System.Drawing.Size(142, 6);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.exitToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
@ -1613,7 +1613,7 @@
// StatusSlot0
//
this.StatusSlot0.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.DumpError,
this.DumpStatus,
this.EmuStatus,
this.PlayRecordStatus,
this.PauseStrip,
@ -1630,20 +1630,22 @@
this.StatusSlot10});
this.StatusSlot0.Location = new System.Drawing.Point(0, 386);
this.StatusSlot0.Name = "StatusSlot0";
this.StatusSlot0.ShowItemToolTips = true;
this.StatusSlot0.Size = new System.Drawing.Size(470, 22);
this.StatusSlot0.SizingGrip = false;
this.StatusSlot0.TabIndex = 1;
this.StatusSlot0.Text = "0";
//
// DumpError
// DumpStatus
//
this.DumpError.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.DumpError.Image = global::BizHawk.MultiClient.Properties.Resources.Blank;
this.DumpError.ImageTransparentColor = System.Drawing.Color.Magenta;
this.DumpError.Name = "DumpError";
this.DumpError.ShowDropDownArrow = false;
this.DumpError.Size = new System.Drawing.Size(20, 20);
this.DumpError.Text = "No ROM loaded";
this.DumpStatus.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.DumpStatus.Image = global::BizHawk.MultiClient.Properties.Resources.Blank;
this.DumpStatus.ImageTransparentColor = System.Drawing.Color.Magenta;
this.DumpStatus.Name = "DumpStatus";
this.DumpStatus.ShowDropDownArrow = false;
this.DumpStatus.Size = new System.Drawing.Size(20, 20);
this.DumpStatus.Text = "No ROM loaded";
this.DumpStatus.Click += new System.EventHandler(this.DumpStatus_Click);
//
// EmuStatus
//
@ -2100,7 +2102,7 @@
private System.Windows.Forms.ToolStripMenuItem stopMovieToolStripMenuItem1;
private System.Windows.Forms.ToolStripDropDownButton PauseStrip;
private System.Windows.Forms.ToolStripDropDownButton PlayRecordStatus;
private System.Windows.Forms.ToolStripDropDownButton DumpError;
private System.Windows.Forms.ToolStripDropDownButton DumpStatus;
private System.Windows.Forms.ToolStripMenuItem viewSubtitlesToolStripMenuItem;
private MenuStripEx menuStrip1;
private System.Windows.Forms.ToolStripMenuItem gBToolStripMenuItem;

View File

@ -8,6 +8,14 @@ namespace BizHawk.MultiClient
{
partial class MainForm
{
private void DumpStatus_Click(object sender, EventArgs e)
{
string details = Global.Emulator.CoreOutputComm.RomStatusDetails;
if(string.IsNullOrEmpty(details)) return;
var lw = new LogWindow();
lw.ShowReport("Dump Status Report",details);
}
private void RAMPokeToolStripMenuItem_Click(object sender, EventArgs e)
{
RamPoke r = new RamPoke();

View File

@ -865,6 +865,10 @@ namespace BizHawk.MultiClient
try
{
nextEmulator.CoreInputComm = Global.CoreInputComm;
//this is a bit hacky, but many cores do not take responsibility for setting this, so we need to set it for them.
nextEmulator.CoreOutputComm.RomStatus = game.Status;
nextEmulator.LoadGame(game);
}
catch (Exception ex)
@ -928,49 +932,52 @@ namespace BizHawk.MultiClient
private void UpdateDumpIcon()
{
if (Global.Game != null)
DumpStatus.Image = BizHawk.MultiClient.Properties.Resources.Blank;
DumpStatus.ToolTipText = "";
if (Global.Emulator == null) return;
var status = Global.Emulator.CoreOutputComm.RomStatus;
string annotation = "";
if (status == RomStatus.BadDump)
{
if (Global.Game.Status == RomStatus.BadDump)
{
DumpError.Image = BizHawk.MultiClient.Properties.Resources.ExclamationRed;
DumpError.ToolTipText = "Warning: Bad ROM Dump";
}
else if (Global.Game.Status == RomStatus.Overdump)
{
DumpError.Image = BizHawk.MultiClient.Properties.Resources.ExclamationRed;
DumpError.ToolTipText = "Warning: Overdump";
}
else if (Global.Game.Status == RomStatus.NotInDatabase)
{
DumpError.Image = BizHawk.MultiClient.Properties.Resources.RetroQuestion;
DumpError.ToolTipText = "Warning: Unknown ROM";
}
else if (Global.Game.Status == RomStatus.TranslatedRom)
{
DumpError.Image = BizHawk.MultiClient.Properties.Resources.Translation;
DumpError.ToolTipText = "Translated ROM";
}
else if (Global.Game.Status == RomStatus.Homebrew)
{
DumpError.Image = BizHawk.MultiClient.Properties.Resources.HomeBrew;
DumpError.ToolTipText = "Homebrew ROM";
}
else if (Global.Game.Status == RomStatus.Hack)
{
DumpError.Image = BizHawk.MultiClient.Properties.Resources.Hack;
DumpError.ToolTipText = "Hacked ROM";
}
else
{
DumpError.Image = BizHawk.MultiClient.Properties.Resources.GreenCheck;
DumpError.ToolTipText = "Verified good dump";
}
DumpStatus.Image = BizHawk.MultiClient.Properties.Resources.ExclamationRed;
annotation = "Warning: Bad ROM Dump";
}
else if (status == RomStatus.Overdump)
{
DumpStatus.Image = BizHawk.MultiClient.Properties.Resources.ExclamationRed;
annotation = "Warning: Overdump";
}
else if (status == RomStatus.NotInDatabase)
{
DumpStatus.Image = BizHawk.MultiClient.Properties.Resources.RetroQuestion;
annotation = "Warning: Unknown ROM";
}
else if (status == RomStatus.TranslatedRom)
{
DumpStatus.Image = BizHawk.MultiClient.Properties.Resources.Translation;
annotation = "Translated ROM";
}
else if (status == RomStatus.Homebrew)
{
DumpStatus.Image = BizHawk.MultiClient.Properties.Resources.HomeBrew;
annotation = "Homebrew ROM";
}
else if (Global.Game.Status == RomStatus.Hack)
{
DumpStatus.Image = BizHawk.MultiClient.Properties.Resources.Hack;
annotation = "Hacked ROM";
}
else
{
DumpError.Image = BizHawk.MultiClient.Properties.Resources.Blank;
DumpError.ToolTipText = "";
DumpStatus.Image = BizHawk.MultiClient.Properties.Resources.GreenCheck;
annotation = "Verified good dump";
}
if (!string.IsNullOrEmpty(Global.Emulator.CoreOutputComm.RomStatusAnnotation))
annotation = Global.Emulator.CoreOutputComm.RomStatusAnnotation;
DumpStatus.ToolTipText = annotation;
}
private void LoadSaveRam()
@ -2523,5 +2530,8 @@ namespace BizHawk.MultiClient
{
Global.Config.DisplaySubtitles ^= true;
}
}
}

View File

@ -2325,21 +2325,21 @@ sha1:99C18C91F051BFBA6836A7B6B213C77569D83767 After Burner 2 (J) NES board=SUN
sha1:CF655333DCE649A3C7060E9989860F2FC74E473A Demon Sword (U) NES board=NES-SL1ROM;PRG=128;CHR=128
sha1:7786BA1FE8E7E9E542EEB13CF2A6E2A1AD7F696D Metal Gear (U) NES board=KONAMI-UNROM;PRG=128
sha1:894F20405286F5F75133CE4648300E2C67972B40 Solomon's Key (U) NES board=NES-CNROM;PRG=32;CHR=32
sha1:0C53B06E1D13AE917536BB39010914EA3D111FF5 Thunder & Lightning (U) NES board=NES-GNROM;PRG=128;CHR=32;bad
sha1:0C53B06E1D13AE917536BB39010914EA3D111FF5 B Thunder & Lightning (U) NES board=NES-GNROM;PRG=128;CHR=32
sha1:9BDFF9A19265D84979F43F0F6E925A735DDEB38B Wai Xing Zhan Shi (Ch) NES board=Mapper242;PRG=512;CHR=0;VRAM=8;WRAM=8
sha1:91CECCFCAC90E417E9AEE80E8F7B560A20EB33CC Ai Sensei No Oshiete - Watashi No Hoshi (J) NES board=IREM-G101;PRG=256;CHR=128;WRAM=8
sha1:B6F6BD9D78CDD264A117D4B647AEE3309993E9A9 Mike Tyson's Punch-Out!! (U) NES board=NES-PNROM;PRG=128;CHR=128;WRAM=0
sha1:A0C4D4172A0037B7D9BA729A93E809978D0F10D2 Punch-Out!! (U) NES board=NES-PNROM;PRG=128;CHR=128;WRAM=0
;and these are even labeled as bad in goodNES
sha1:984ADAEB85403EEF1BA85CDCF310FAAECEB409A0 Adventures of Captain Comic, The (Bad Dump) (U) NES board=COLORDREAMS-74*377;PRG=64;CHR=64;WRAM=0;VRAM=0;bad
sha1:869111A86FD46872AD8B1BA0ED31B858FA15681F Adventures of Lolo (Bad Dump) (U) NES board=NES-SEROM;PRG=32;CHR=32;WRAM=0;VRAM=0;bad
sha1:41BD74F739E008D476989C8296BB789EE57658F0 Adventures of Lolo (Bad Dump 2) (U) NES board=NES-SEROM;PRG=32;CHR=32;WRAM=0;VRAM=0;bad
sha1:10AF069B2AC5DB2FB10768349F4068CB3CDA0EC7 Airwolf (Bad Dump 1) (U) NES board=NES-SH1ROM;PRG=32;CHR=128;bad
sha1:DAD9D1D66018DFB3C30F48741EF188FEFA2B2F68 Airwolf (Bad Dump 2) (U) NES board=NES-SH1ROM;PRG=32;CHR=128;bad
sha1:984ADAEB85403EEF1BA85CDCF310FAAECEB409A0 B Adventures of Captain Comic, The (Bad Dump) (U) NES board=COLORDREAMS-74*377;PRG=64;CHR=64;WRAM=0;VRAM=0
sha1:869111A86FD46872AD8B1BA0ED31B858FA15681F B Adventures of Lolo (Bad Dump) (U) NES board=NES-SEROM;PRG=32;CHR=32;WRAM=0;VRAM=0
sha1:41BD74F739E008D476989C8296BB789EE57658F0 B Adventures of Lolo (Bad Dump 2) (U) NES board=NES-SEROM;PRG=32;CHR=32;WRAM=0;VRAM=0
sha1:10AF069B2AC5DB2FB10768349F4068CB3CDA0EC7 B Airwolf (Bad Dump 1) (U) NES board=NES-SH1ROM;PRG=32;CHR=128
sha1:DAD9D1D66018DFB3C30F48741EF188FEFA2B2F68 B Airwolf (Bad Dump 2) (U) NES board=NES-SH1ROM;PRG=32;CHR=128
;these roms are from goodNES but they are confusingly messed up somehow
sha1:36405B87E66E18DC432690A5959D4529C14B1AEE High Speed (U) NES board=NES-TQROM;PRG=128;CHR=64;VRAM=8;WRAM=0;bad
sha1:36405B87E66E18DC432690A5959D4529C14B1AEE B High Speed (U) NES board=NES-TQROM;PRG=128;CHR=64;VRAM=8;WRAM=0
sha1:192C543866F1037276D2778046ABEDCA84868E26 Bio Senshi Dan - Increaser To No Tatakai (J) NES board=JALECO-JF-14;PRG=128;CHR=128
sha1:E80FF0B707B0D675FDBEF474E3FDB1A83E2B7C44 Mississippi Satsujin Jiken (J) NES board=JALECO-JF-11;PRG=128;CHR=32;PAD_H=1
sha1:8A5FD1061ADACDEABF422A2D2E555FF70749AE7C Mississippi Satsujin Jiken (Alt) (J) NES board=GXROM_HACKY;PRG=128;CHR=32;PAD_H=1
@ -2347,9 +2347,9 @@ sha1:8C7D33753649A2BAF2EAAF8D5FFC2AE8E9316A13 Akira (J) NES board=TAITO-TC0190
sha1:0AE47BD83202A5A2235B0BC16278F56D66038AB5 Deathbots (U) NES board=AVE-NINA-06;PRG=64;CHR=64;PAD_H=1;PAD_V=0
;these roms are in goodNES but theyre junk
sha1:4D6117577CE301BB987C5C32FEEF7B132A21B046 Afro Man (Mega Man 3 Hack) (UNL) NES board=TXROM-HOMEBREW;PRG=256;CHR=128;WRAM=8
sha1:7BD102770FE7766BF8430ACDB3C17EE51E30478C Mike Tyson's Punch-Out!! (Hacked) (U) NES board=NES-PNROM;PRG=128;CHR=128;WRAM=0
sha1:536D623BA02A622BDE8E2D7D514AE9785B5E0357 Punch Out!! Kirby (Hack) (U) NES board=NES-PNROM;PRG=128;CHR=128;WRAM=0
sha1:4D6117577CE301BB987C5C32FEEF7B132A21B046 H Afro Man (Mega Man 3 Hack) (UNL) NES board=TXROM-HOMEBREW;PRG=256;CHR=128;WRAM=8
sha1:7BD102770FE7766BF8430ACDB3C17EE51E30478C H Mike Tyson's Punch-Out!! (Hacked) (U) NES board=NES-PNROM;PRG=128;CHR=128;WRAM=0
sha1:536D623BA02A622BDE8E2D7D514AE9785B5E0357 H Punch Out!! Kirby (Hack) (U) NES board=NES-PNROM;PRG=128;CHR=128;WRAM=0
;other assorted roms
sha1:92D9695FEB774F60965A8303CFE3E6AAEE7B7B62 Magic Dragon (Unl) NES board=Mapper107;PRG=128;CHR=64;WRAM=8;PAD_H=1