From 7cf79aae8c6b4d5b13b97a727ed1830451b67586 Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 26 Oct 2015 19:36:26 -0500 Subject: [PATCH] CDL - add byte counter, fix bug resetting GB --- BizHawk.Client.EmuHawk/tools/CDL.Designer.cs | 12 ++++++------ BizHawk.Client.EmuHawk/tools/CDL.cs | 8 +++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/CDL.Designer.cs b/BizHawk.Client.EmuHawk/tools/CDL.Designer.cs index 1674d4559b..1e2947c471 100644 --- a/BizHawk.Client.EmuHawk/tools/CDL.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/CDL.Designer.cs @@ -52,7 +52,7 @@ // this.LoggingActiveCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.LoggingActiveCheckbox.AutoSize = true; - this.LoggingActiveCheckbox.Location = new System.Drawing.Point(12, 244); + this.LoggingActiveCheckbox.Location = new System.Drawing.Point(12, 240); this.LoggingActiveCheckbox.Name = "LoggingActiveCheckbox"; this.LoggingActiveCheckbox.Size = new System.Drawing.Size(107, 17); this.LoggingActiveCheckbox.TabIndex = 1; @@ -67,7 +67,7 @@ this.FileSubMenu}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(292, 24); + this.menuStrip1.Size = new System.Drawing.Size(463, 24); this.menuStrip1.TabIndex = 2; this.menuStrip1.Text = "menuStrip1"; // @@ -190,22 +190,22 @@ this.CdlTextbox.Multiline = true; this.CdlTextbox.Name = "CdlTextbox"; this.CdlTextbox.ReadOnly = true; - this.CdlTextbox.Size = new System.Drawing.Size(292, 211); + this.CdlTextbox.Size = new System.Drawing.Size(463, 207); this.CdlTextbox.TabIndex = 3; // - // PCECDL + // CDL // this.AllowDrop = true; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(292, 273); + this.ClientSize = new System.Drawing.Size(463, 269); this.Controls.Add(this.CdlTextbox); this.Controls.Add(this.LoggingActiveCheckbox); this.Controls.Add(this.menuStrip1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MainMenuStrip = this.menuStrip1; this.MinimumSize = new System.Drawing.Size(150, 130); - this.Name = "PCECDL"; + this.Name = "CDL"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Code Data Logger"; this.Load += new System.EventHandler(this.PCECDL_Load); diff --git a/BizHawk.Client.EmuHawk/tools/CDL.cs b/BizHawk.Client.EmuHawk/tools/CDL.cs index d4e894e6f6..af2124f9a1 100644 --- a/BizHawk.Client.EmuHawk/tools/CDL.cs +++ b/BizHawk.Client.EmuHawk/tools/CDL.cs @@ -61,6 +61,8 @@ namespace BizHawk.Client.EmuHawk public void Restart() { + //zeromus doesn't like this logic very much. it has to change. + if (_emu.SystemId == "PCE") { var pce = _emu as PCEngine; @@ -72,6 +74,10 @@ namespace BizHawk.Client.EmuHawk { var gambatte = _emu as Gameboy; _cdl = gambatte.CDL; + if (_cdl == null) + LoggingActiveCheckbox.Checked = false; + else + LoggingActiveCheckbox.Checked = _cdl.Active; } UpdateDisplay(); } @@ -105,7 +111,7 @@ namespace BizHawk.Client.EmuHawk } } - lines.Add(string.Format("Domain {0} Size {1} Mapped {2}%", kvp.Key, kvp.Value.Length, total / (float) kvp.Value.Length * 100f)); + lines.Add(string.Format("Domain {0} Size {1} Mapped {2}% ({3}/{4} bytes)", kvp.Key, kvp.Value.Length, total / (float) kvp.Value.Length * 100f, total, kvp.Value.Length)); } }