From 133723e50f8763382a7da26364353c6e37ae971f Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 6 Feb 2015 00:56:54 +0000 Subject: [PATCH] Debugger - clean up some code --- .../tools/Debugger/GenericDebugger.Disassembler.cs | 4 ++-- .../tools/Debugger/GenericDebugger.IToolForm.cs | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs index 83b0450938..8a635feb8a 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs @@ -39,7 +39,7 @@ namespace BizHawk.Client.EmuHawk { DisassemblerView.BlazingFast = true; DisassemblerView.ItemCount = 0; - currentDisassemblerAddress = PC; + currentDisassemblerAddress = (uint)PCRegister.Value; Disassemble(); DisassemblerView.Refresh(); DisassemblerView.BlazingFast = false; @@ -88,7 +88,7 @@ namespace BizHawk.Client.EmuHawk { if (DisassemblyLines.Any() && index < DisassemblyLines.Count) { - if (DisassemblyLines[index].Address == PC) + if (DisassemblyLines[index].Address == (uint)PCRegister.Value) { color = Color.LightCyan; } diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs index b54f8281d9..47a6a855fa 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs @@ -26,13 +26,6 @@ namespace BizHawk.Client.EmuHawk get { return Debuggable.GetCpuFlagsAndRegisters()[Disassembler.PCRegisterName]; } } - // TODO: get rid of me - private uint PC - { - // TODO: is this okay for N64? - get { return (uint)Debuggable.GetCpuFlagsAndRegisters()[Disassembler.PCRegisterName].Value; } - } - #region Implementation checking private bool CanUseMemoryCallbacks @@ -67,7 +60,7 @@ namespace BizHawk.Client.EmuHawk try { - var pc = PC; + var pc = (uint)PCRegister.Value; return true; } catch (NotImplementedException)