PCE CDL: open for business! not very tested yet. DOES NOT WORK ON SF2 MAPPER.
This commit is contained in:
parent
d22b35c240
commit
c9c01202e6
|
@ -662,6 +662,12 @@
|
|||
<Compile Include="tools\PCE\PCEBGViewer.Designer.cs">
|
||||
<DependentUpon>PCEBGViewer.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\PCE\PCECDL.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\PCE\PCECDL.Designer.cs">
|
||||
<DependentUpon>PCECDL.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\PCE\PCETileViewer.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -1085,6 +1091,9 @@
|
|||
<EmbeddedResource Include="tools\PCE\PCEBGViewer.resx">
|
||||
<DependentUpon>PCEBGViewer.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\PCE\PCECDL.resx">
|
||||
<DependentUpon>PCECDL.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\PCE\PCETileViewer.resx">
|
||||
<DependentUpon>PCETileViewer.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -238,6 +238,7 @@
|
|||
this.toolStripSeparator24 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.SMSGraphicsSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.GGGameGenieMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SMSVDPViewerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.TI83SubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.KeypadMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
|
||||
|
@ -342,7 +343,7 @@
|
|||
this.ClearSRAMContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SMSVDPViewerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.codeDataLoggerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.MainformMenu.SuspendLayout();
|
||||
this.MainStatusBar.SuspendLayout();
|
||||
this.MainFormContextMenu.SuspendLayout();
|
||||
|
@ -1991,6 +1992,7 @@
|
|||
this.PCESubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.PCEBGViewerMenuItem,
|
||||
this.PCEtileViewerToolStripMenuItem,
|
||||
this.codeDataLoggerToolStripMenuItem,
|
||||
this.toolStripSeparator25,
|
||||
this.PCEAlwaysPerformSpriteLimitMenuItem,
|
||||
this.PCEAlwaysEqualizeVolumesMenuItem,
|
||||
|
@ -2127,6 +2129,13 @@
|
|||
this.GGGameGenieMenuItem.Text = "&Game Genie Encoder/Decoder";
|
||||
this.GGGameGenieMenuItem.Click += new System.EventHandler(this.GGGameGenieMenuItem_Click);
|
||||
//
|
||||
// SMSVDPViewerToolStripMenuItem
|
||||
//
|
||||
this.SMSVDPViewerToolStripMenuItem.Name = "SMSVDPViewerToolStripMenuItem";
|
||||
this.SMSVDPViewerToolStripMenuItem.Size = new System.Drawing.Size(221, 22);
|
||||
this.SMSVDPViewerToolStripMenuItem.Text = "&VDP Viewer";
|
||||
this.SMSVDPViewerToolStripMenuItem.Click += new System.EventHandler(this.SMSVDPViewerToolStripMenuItem_Click);
|
||||
//
|
||||
// TI83SubMenu
|
||||
//
|
||||
this.TI83SubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
|
@ -2986,12 +2995,12 @@
|
|||
this.ShowMenuContextMenuItem.Text = "Show Menu";
|
||||
this.ShowMenuContextMenuItem.Click += new System.EventHandler(this.ShowMenuContextMenuItem_Click);
|
||||
//
|
||||
// SMSVDPViewerToolStripMenuItem
|
||||
// codeDataLoggerToolStripMenuItem
|
||||
//
|
||||
this.SMSVDPViewerToolStripMenuItem.Name = "SMSVDPViewerToolStripMenuItem";
|
||||
this.SMSVDPViewerToolStripMenuItem.Size = new System.Drawing.Size(221, 22);
|
||||
this.SMSVDPViewerToolStripMenuItem.Text = "&VDP Viewer";
|
||||
this.SMSVDPViewerToolStripMenuItem.Click += new System.EventHandler(this.SMSVDPViewerToolStripMenuItem_Click);
|
||||
this.codeDataLoggerToolStripMenuItem.Name = "codeDataLoggerToolStripMenuItem";
|
||||
this.codeDataLoggerToolStripMenuItem.Size = new System.Drawing.Size(240, 22);
|
||||
this.codeDataLoggerToolStripMenuItem.Text = "Code-Data Logger";
|
||||
this.codeDataLoggerToolStripMenuItem.Click += new System.EventHandler(this.codeDataLoggerToolStripMenuItem_Click);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
|
@ -3348,6 +3357,7 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem DisplayConfigMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem PCEtileViewerToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem SMSVDPViewerToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem codeDataLoggerToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3062,5 +3062,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
GlobalWin.Tools.Load<VDPViewer>();
|
||||
}
|
||||
|
||||
private void codeDataLoggerToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
GlobalWin.Tools.Load<PCECDL>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
<data name="DisplayConfigMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsAAAA7AAWrWiQkAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NC
|
||||
YQUAAAAJcEhZcwAADr8AAA6/ATgFUyQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NC
|
||||
NwAAAaRJREFUOE+dk0FLAlEUhd9/kgwFMUQMhMEIhJLIhVCRDIRhAznEIEYtlBiQYApBSGQw2xhBlhLE
|
||||
zCLQTa3bt2nd8tR5pFTaLLxwuJd7vgNv3syIv+Xz+fA9TpSX96s0TZsAp+0862fAM3xpN5DNZpHL5VAo
|
||||
FFAqlVCpVFCtVsEgxZk7emTIMsOsyGQyGAwGM4lZkU6n4bouVg4aCO1cQDGusXbyiA1rIMWZO3pkyEYi
|
||||
|
|
|
@ -0,0 +1,156 @@
|
|||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
partial class PCECDL
|
||||
{
|
||||
/// <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.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.unionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(12, 244);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(101, 17);
|
||||
this.checkBox1.TabIndex = 1;
|
||||
this.checkBox1.Text = "Loging is Active";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(292, 24);
|
||||
this.menuStrip1.TabIndex = 2;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.newToolStripMenuItem,
|
||||
this.clearToolStripMenuItem,
|
||||
this.loadToolStripMenuItem,
|
||||
this.saveToolStripMenuItem,
|
||||
this.unionToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// clearToolStripMenuItem
|
||||
//
|
||||
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
|
||||
this.clearToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.clearToolStripMenuItem.Text = "&Clear";
|
||||
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
|
||||
//
|
||||
// loadToolStripMenuItem
|
||||
//
|
||||
this.loadToolStripMenuItem.Name = "loadToolStripMenuItem";
|
||||
this.loadToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.loadToolStripMenuItem.Text = "&Load...";
|
||||
this.loadToolStripMenuItem.Click += new System.EventHandler(this.loadToolStripMenuItem_Click);
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.saveToolStripMenuItem.Text = "&Save...";
|
||||
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||
//
|
||||
// unionToolStripMenuItem
|
||||
//
|
||||
this.unionToolStripMenuItem.Name = "unionToolStripMenuItem";
|
||||
this.unionToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.unionToolStripMenuItem.Text = "&Union...";
|
||||
this.unionToolStripMenuItem.Click += new System.EventHandler(this.unionToolStripMenuItem_Click);
|
||||
//
|
||||
// newToolStripMenuItem
|
||||
//
|
||||
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
|
||||
this.newToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.newToolStripMenuItem.Text = "&New";
|
||||
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox1.Location = new System.Drawing.Point(0, 27);
|
||||
this.textBox1.Multiline = true;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ReadOnly = true;
|
||||
this.textBox1.Size = new System.Drawing.Size(292, 211);
|
||||
this.textBox1.TabIndex = 3;
|
||||
//
|
||||
// PCECDL
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(292, 273);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "PCECDL";
|
||||
this.Text = "PCE Code Data Logger";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PCECDL_FormClosing);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem loadToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem unionToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,196 @@
|
|||
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;
|
||||
using BizHawk.Client.Common;
|
||||
|
||||
using BizHawk.Emulation.Cores.PCEngine;
|
||||
using BizHawk.Emulation.Cores.Components.H6280;
|
||||
|
||||
using System.IO;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public partial class PCECDL : Form, IToolForm
|
||||
{
|
||||
PCEngine emu;
|
||||
CodeDataLog CDL;
|
||||
|
||||
public PCECDL()
|
||||
{
|
||||
InitializeComponent();
|
||||
Restart();
|
||||
}
|
||||
|
||||
public void UpdateValues()
|
||||
{
|
||||
UpdateDisplay();
|
||||
}
|
||||
|
||||
public void Restart()
|
||||
{
|
||||
if (Global.Emulator is PCEngine)
|
||||
{
|
||||
emu = (PCEngine)Global.Emulator;
|
||||
checkBox1.Checked = emu.Cpu.CDLLoggingActive;
|
||||
CDL = emu.Cpu.CDL;
|
||||
UpdateDisplay();
|
||||
}
|
||||
else
|
||||
{
|
||||
emu = null;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateDisplay()
|
||||
{
|
||||
List<string> Lines = new List<string>();
|
||||
if (CDL == null)
|
||||
{
|
||||
Lines.Add("No CDL loaded.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Lines.Add("CDL contains the following domains:");
|
||||
foreach (var kvp in CDL)
|
||||
{
|
||||
int total = 0;
|
||||
unsafe
|
||||
{
|
||||
fixed (byte* data = kvp.Value)
|
||||
{
|
||||
byte* src = data;
|
||||
byte* end = data + kvp.Value.Length;
|
||||
while (src < end)
|
||||
{
|
||||
if (*src++ != 0)
|
||||
total++;
|
||||
}
|
||||
}
|
||||
}
|
||||
Lines.Add(string.Format("Domain {0} Size {1} Mapped {2}%", kvp.Key, kvp.Value.Length, total / (float) kvp.Value.Length * 100f));
|
||||
}
|
||||
}
|
||||
textBox1.Lines = Lines.ToArray();
|
||||
}
|
||||
|
||||
public bool AskSave()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool UpdateBefore
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
private void newToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var result = MessageBox.Show(this, "OK to create new CDL?", "Query", MessageBoxButtons.YesNo);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
CDL = CodeDataLog.Create(emu.Cpu.Mappings);
|
||||
emu.Cpu.CDL = CDL;
|
||||
UpdateDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
private void loadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var result = MessageBox.Show(this, "OK to load new CDL?", "Query", MessageBoxButtons.YesNo);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
var ofd = new OpenFileDialog();
|
||||
result = ofd.ShowDialog(this);
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
using (FileStream fs = new FileStream(ofd.FileName, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
CDL = CodeDataLog.Load(fs);
|
||||
emu.Cpu.CDL = CDL;
|
||||
UpdateDisplay();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CDL == null)
|
||||
{
|
||||
MessageBox.Show(this, "Cannot save with no CDL loaded!", "Alert");
|
||||
}
|
||||
else
|
||||
{
|
||||
var sfd = new SaveFileDialog();
|
||||
var result = sfd.ShowDialog(this);
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
using (FileStream fs = new FileStream(sfd.FileName, FileMode.Create, FileAccess.Write))
|
||||
{
|
||||
CDL.Save(fs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void unionToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CDL == null)
|
||||
{
|
||||
MessageBox.Show(this, "Cannot union with no CDL loaded!", "Alert");
|
||||
}
|
||||
else
|
||||
{
|
||||
var ofd = new OpenFileDialog();
|
||||
var result = ofd.ShowDialog(this);
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
using (FileStream fs = new FileStream(ofd.FileName, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
var newCDL = CodeDataLog.Load(fs);
|
||||
CDL.LogicalOrFrom(newCDL);
|
||||
UpdateDisplay();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PCECDL_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void clearToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CDL == null)
|
||||
{
|
||||
MessageBox.Show(this, "Cannot clear with no CDL loaded!", "Alert");
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = MessageBox.Show(this, "OK to clear CDL?", "Query", MessageBoxButtons.YesNo);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
CDL.ClearData();
|
||||
UpdateDisplay();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkBox1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox1.Checked && CDL == null)
|
||||
{
|
||||
MessageBox.Show(this, "Cannot log with no CDL loaded!", "Alert");
|
||||
checkBox1.Checked = false;
|
||||
}
|
||||
emu.Cpu.CDLLoggingActive = checkBox1.Checked;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -94,9 +94,9 @@ namespace BizHawk.Emulation.Cores.Components.H6280
|
|||
}
|
||||
public MemMapping[] Mappings; // = new MemMapping[256];
|
||||
|
||||
public CodeDataLog CDL = null;
|
||||
|
||||
public CodeDataLog CDL;
|
||||
|
||||
public bool CDLLoggingActive = false;
|
||||
|
||||
[Flags]
|
||||
enum CDLUsage : byte
|
||||
|
|
|
@ -60,6 +60,7 @@ namespace BizHawk.Emulation.Cores.Components.H6280
|
|||
|
||||
if (Debug) Logger(State());
|
||||
CoreComm.MemoryCallbackSystem.CallExecute(PC);
|
||||
if (CDLLoggingActive) CDLOpcode();
|
||||
|
||||
byte opcode = ReadMemory(PC++);
|
||||
switch (opcode)
|
||||
|
|
|
@ -236,6 +236,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
Cpu.ResetPC();
|
||||
SetupMemoryDomains();
|
||||
SetupStateBuff();
|
||||
InitCDLMappings();
|
||||
}
|
||||
|
||||
int _lagcount = 0;
|
||||
|
|
|
@ -495,6 +495,7 @@ namespace HuC6280
|
|||
w.WriteLine();
|
||||
w.WriteLine(" if (Debug) Logger(State());");
|
||||
w.WriteLine(" CoreComm.MemoryCallbackSystem.CallExecute(PC);");
|
||||
w.WriteLine(" if (CDLLoggingActive) CDLOpcode();");
|
||||
w.WriteLine();
|
||||
w.WriteLine(" byte opcode = ReadMemory(PC++);");
|
||||
w.WriteLine(" switch (opcode)");
|
||||
|
|
Loading…
Reference in New Issue