Debugger: Fixed edit breakpoint in SPC memory opening the wrong breakpoint window

This commit is contained in:
Sour 2019-12-26 13:18:46 -05:00
parent ffcbef8e84
commit b5876ab8b1
3 changed files with 16 additions and 6 deletions

View file

@ -17,8 +17,8 @@ namespace Mesen.GUI.Config
public class HexEditorInfo
{
public bool HighDensityTextMode = false;
public bool EnablePerByteNavigation = false;
public bool ByteEditingMode = false;
public bool EnablePerByteNavigation = true;
public bool ByteEditingMode = true;
public bool AutoRefresh = true;
public RefreshSpeed AutoRefreshSpeed = RefreshSpeed.Normal;
public bool IgnoreRedundantWrites = false;
@ -42,11 +42,8 @@ namespace Mesen.GUI.Config
public bool HideExecutedBytes = false;
public bool HighlightBreakpoints = false;
public bool HighlightLabelledBytes = false;
public bool HighlightChrDrawnBytes = false;
public bool HighlightChrReadBytes = false;
public bool HighlightCodeBytes = false;
public bool HighlightDataBytes = false;
public bool HighlightDmcDataBytes = false;
public XmlColor ReadColor = Color.Blue;
public XmlColor WriteColor = Color.Red;

View file

@ -523,7 +523,7 @@ namespace Mesen.GUI.Debugger.Controls
Breakpoint bp = BreakpointManager.GetMatchingBreakpoint(startAddress, endAddress, _memoryType);
if(bp == null) {
bp = new Breakpoint() { Address = startAddress, MemoryType = _memoryType, StartAddress = startAddress, EndAddress = endAddress, AddressType = addressType, BreakOnWrite = true, BreakOnRead = true };
bp = new Breakpoint() { Address = startAddress, MemoryType = _memoryType, CpuType = _memoryType.ToCpuType(), StartAddress = startAddress, EndAddress = endAddress, AddressType = addressType, BreakOnWrite = true, BreakOnRead = true };
if(bp.IsCpuBreakpoint) {
bp.BreakOnExec = true;
}

View file

@ -190,6 +190,19 @@ namespace Mesen.GUI
case SnesMemoryType.SpcRom:
return CpuType.Spc;
case SnesMemoryType.GsuMemory:
case SnesMemoryType.GsuWorkRam:
return CpuType.Gsu;
case SnesMemoryType.Sa1InternalRam:
case SnesMemoryType.Sa1Memory:
return CpuType.Sa1;
case SnesMemoryType.DspDataRam:
case SnesMemoryType.DspDataRom:
case SnesMemoryType.DspProgramRom:
return CpuType.NecDsp;
default:
return CpuType.Cpu;
}