diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs index 42798f57a8..c19cfb5351 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs @@ -10,6 +10,7 @@ namespace BizHawk.Client.EmuHawk public partial class GenericDebugger { private readonly List DisassemblyLines = new List(); + int PCRegisterSize = 4; private class DisasmOp { @@ -76,7 +77,7 @@ namespace BizHawk.Client.EmuHawk if (column == 0) { // feos: address size must be platform dependant - text = string.Format("{0:X}", DisassemblyLines[index].Address); + text = string.Format("{0:X" + PCRegisterSize + "}", DisassemblyLines[index].Address); } else if (column == 1) { @@ -185,7 +186,7 @@ namespace BizHawk.Client.EmuHawk { if (blob.Length != 0) blob.AppendLine(); - blob.Append(string.Format("{0:X}", DisassemblyLines[index].Address)) + blob.Append(string.Format("{0:X" + PCRegisterSize + "}", DisassemblyLines[index].Address)) .Append(" ") .Append(DisassemblyLines[index].Mnemonic); } diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs index fe29a6f131..47a6a855fa 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs @@ -36,7 +36,7 @@ namespace BizHawk.Client.EmuHawk { try { - var result = Debuggable.MemoryCallbacksAvailable(); + var result = Debuggable.MemoryCallbacks.HasReads; return true; } catch (NotImplementedException) diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs index 29f2949687..da12e5dd0c 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs @@ -74,6 +74,7 @@ namespace BizHawk.Client.EmuHawk }); } + PCRegisterSize = Debuggable.GetCpuFlagsAndRegisters()[Disassembler.PCRegisterName].BitSize / 4; SetDisassemblerItemCount(); UpdateDisassembler(); }