diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs index c19cfb5351..3dd89fccc6 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs @@ -11,6 +11,7 @@ namespace BizHawk.Client.EmuHawk { private readonly List DisassemblyLines = new List(); int PCRegisterSize = 4; + uint currentDisassemblerAddress = 0; private class DisasmOp { @@ -34,21 +35,22 @@ namespace BizHawk.Client.EmuHawk } } + public void UpdatePC() + { + currentDisassemblerAddress = (uint)PCRegister.Value; + } + private void UpdateDisassembler() { if (CanDisassemble) { DisassemblerView.BlazingFast = true; - - currentDisassemblerAddress = (uint)PCRegister.Value; Disassemble(); SetDisassemblerItemCount(); DisassemblerView.BlazingFast = false; } } - - uint currentDisassemblerAddress = 0; - + private void Disassemble() { int line_count = DisassemblerView.NumberOfVisibleRows; @@ -76,7 +78,6 @@ namespace BizHawk.Client.EmuHawk { if (column == 0) { - // feos: address size must be platform dependant text = string.Format("{0:X" + PCRegisterSize + "}", DisassemblyLines[index].Address); } else if (column == 1) @@ -90,7 +91,7 @@ namespace BizHawk.Client.EmuHawk { if (DisassemblyLines.Any() && index < DisassemblyLines.Count) { - if (DisassemblyLines[index].Address == (uint)PCRegister.Value) + if (DisassemblyLines[index].Address == currentDisassemblerAddress) { color = Color.LightCyan; } @@ -196,7 +197,8 @@ namespace BizHawk.Client.EmuHawk private void OnPauseChanged(object sender, MainForm.PauseChangedEventArgs e) { - FullUpdate(); + if (e.Paused) + FullUpdate(); } private void DisassemblerContextMenu_Opening(object sender, EventArgs e) diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs index 47a6a855fa..57007d5b57 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs @@ -142,6 +142,7 @@ namespace BizHawk.Client.EmuHawk private void FullUpdate() { RegisterPanel.UpdateValues(); + UpdatePC(); UpdateDisassembler(); BreakPointControl1.UpdateValues(); }